for h in range(15):q="";x=0;exec"x+=1;h+=x%5<1;h-=x%3<1;q+=h and' '*-~(x>9)or`x`;"*100;print q.rstrip()