


# 백준 #5300 (Fill the Rowboats!)
# 입력 N ) 노 젓는 배를 타고 보내야하는 해적의 수
N = int(input())
# 출력 Result ) 공백으로 구분된 각 해적의 번호, 6번째 해적마다 Go! 붙음, 마지막 해적마다 Go! 붙음
for i in range (N) :
print(i+1,end=" ")
if (i+1) % 6 == 0 or (i+1) == N:
print("Go!",end=" ")