n=int(input()) a=0;b=3;c=1;d=5 while(d < 10**(n-1)): a,b = b, 6*b-a+2 c,d= d,6*d-c print(b,b+1,d)