PROGRAMMING:WZ's trip to Syria
It's hard to predict that agent Wangzai was caught by terrorists of is al Qaeda while conducting intelligence reconnaissance in Syria. As a well-trained agent, Wang Tsai certainly won't wait to die. He decided to use his wisdom to get himself out of danger. During the conversation with the terrorist leader, Wang Zai learned that his name was "Joseph sb". So Wang Tsai thought of the problem of Josephus ring (Josephus ring (Josephus problem) is a mathematical application problem: n people (represented by numbers 1, 2, 3... Respectively) are sitting around a round table. Start counting from the person whose number is k, and count to the person whose number is m; His next person starts to count from 1, and the one who counts to m comes out again; Repeat this rule until all the people around the round table are listed.
He decided to play this game with the terrorists, that is, he and the terrorists form a circle, and Wangzai stands first, so his number is 1, and the other terrorists number 2, 3, 4 in turn. So next to Wang Tsai are the terrorists numbered 2 and n. Start counting from Wangzai, and each person who counts to f has to give himself a shot until only one person is left at the end of the game. However, Wang Tsai wanted to make some tricks, that is, he wanted the F value to be a variable, that is, every person died, he started counting from the next person. At this time, the F value of this round was already a new F value. So what's the value of F per round
The rules are as follows:
Default f [0] = 1, f [1] = 2
The rule of F value change: F [n] = f [n-2] + F [n-1]
That is, the first F value in the first round is f [1]. The first person starts counting from 1, and the person counting to f [1] dies. The next person starts counting again from 1, and the person counting to f [2] dies, until the last person is left.
If Wang Zai kills all the terrorists, he can live to the last and output "success!", On the contrary, output "GG!".
###Input format:
There are several groups of input data, each input terrorist number n (n < 28), n = 0 represents the end of the input
###Output format:
If Wang Zai kills all the terrorists, he can live to the last and output "success!", On the contrary, output "GG!"
###Input example:
Here is a set of inputs. For example:
```in
six
0
```
###Output example:
The corresponding output is given here. For example:
```out
success!
```
answer:If there is no answer, please comment
He decided to play this game with the terrorists, that is, he and the terrorists form a circle, and Wangzai stands first, so his number is 1, and the other terrorists number 2, 3, 4 in turn. So next to Wang Tsai are the terrorists numbered 2 and n. Start counting from Wangzai, and each person who counts to f has to give himself a shot until only one person is left at the end of the game. However, Wang Tsai wanted to make some tricks, that is, he wanted the F value to be a variable, that is, every person died, he started counting from the next person. At this time, the F value of this round was already a new F value. So what's the value of F per round
The rules are as follows:
Default f [0] = 1, f [1] = 2
The rule of F value change: F [n] = f [n-2] + F [n-1]
That is, the first F value in the first round is f [1]. The first person starts counting from 1, and the person counting to f [1] dies. The next person starts counting again from 1, and the person counting to f [2] dies, until the last person is left.
If Wang Zai kills all the terrorists, he can live to the last and output "success!", On the contrary, output "GG!".
###Input format:
There are several groups of input data, each input terrorist number n (n < 28), n = 0 represents the end of the input
###Output format:
If Wang Zai kills all the terrorists, he can live to the last and output "success!", On the contrary, output "GG!"
###Input example:
Here is a set of inputs. For example:
```in
six
0
```
###Output example:
The corresponding output is given here. For example:
```out
success!
```
answer:If there is no answer, please comment