from random import *
T,n,m = 10,10000,10000
f = open("input.txt","w")
f.write("10\n")
for _ in range(T):
    f.write("10000 10000\n")
    f.write("\n".join(" ".join([str(randint(1,10)),str(randint(1,10)),str(randint(1,1e8))]) for i in range(m)))
    f.write("\n")