n,k = map(int,input().split()) t = list(map(int,input().split())) u = list(map(int,input().split())) b = 100 m = 50 e = 1 for i in range(n): print(b+10,m,e)