from math import*
n=0
for i in range(1,101):
if i%7==0 and i%5!=0:
print("{:>2d} ".format(i),end="")
n=n+1
if n%6==0:
print()