inp = open("input.txt", "w")
out = open("output.txt", "w")
add2 = open("Addent.txt").readlines()
add1 = open("Augent.txt").readlines()
ins = open("insert.txt").readlines()
num = open("Number.txt").readlines()
pos = open("Position.txt").readlines()
out.write("{}\n".format(len(add1) * 2))
for ln in zip(add1, add2):
    inp.write("1 {} {}\n".format(ln[0].strip(), ln[1].strip()))
    out.write("{}\n".format(int(ln[0]) + int(ln[1])))
for ln in zip(add1, pos, num, ins):
    inp.write("2 {} {} {}\n".format(ln[0].strip(), ln[1].strip(),
                                    ln[2].strip()))
    out.write("{}\n".format(ln[3].strip().replace(',', '')))
