r=range(1,101) for c in r:print''.join(`j`*(j/3==c+j/5-1)or' '[j<10:]for j in r).rstrip()