시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB19251229113664.290%

문제

Captain Jack decides to to take over a rival’s ship. He needs to send his henchmen over on rowboats that can hold 6 pirates each. You will help him count out pirates in groups of 6. The last rowboat may have fewer than 6 pirates. To make your task easier each pirate has been assigned a number from 1 to N.

입력

The input will be N, the number of pirates you need to send over on rowboats.

출력

The output will be the number of each pirate separated by spaces, with the word ”Go!” after every 6th pirate, and after the last pirate.

예제 입력 1

10

예제 출력 1

1 2 3 4 5 6 Go! 7 8 9 10 Go!

예제 입력 2

18

예제 출력 2

1 2 3 4 5 6 Go! 7 8 9 10 11 12 Go! 13 14 15 16 17 18 Go!