#a147. Print it alla = int(input())while a!=0: for i in range(a-1): i +=1 if i %7!=0: print(i,end=" ") print() a = int(input())