By Felipe Fragoso, UFPB Brazil
In Japan, spring always give the air of grace and everyone is looking forward to the Hanami, a ritual to admire the blooming of cherry blossoms, better known as sakura.
Kikuka Bakana, an intelligent and passionate young man, lives in Japan and decided to invent the chomsky’s daisy game. He plans to count the amount of sakura petals that are scattered throughout the yard to serve as an index for the generated sequence of his game. Obviously, he isn't crazy to sweep all the yard and count how many petals are on the floor. So he intends to estimate the amount of petals using his math skills and use a program made by his best Brazilian friend to know if "she loves me" or "she loves not".
Chomsky’s daisy game has an initial symbol and a set of generating rules. From each symbol of the sequence, we can apply the generating rules (ad infinitum) to generate a new sequence.
Kikuka Bakana used the following definition for his game:
Initial symbol: she loves not
Rules: (she loves not ==> she loves not, she loves me), (she loves me ==> she loves me, she loves not)
Sample for a 3-step generation:
{she loves not} ==> {she loves not, she loves me} ==> {she loves not, she loves me, she loves me, she loves not}
The input has several test cases. Each test case contains a number N (0 <= N <= 10 ^ 9) of estimated petals. The input ends with EOF.
For each case, print the corresponding sentence in the sequence generated by the chomsky’s daisy game in a line. (The first element of the sequence has index 0)
Input Sample | Output Sample |
0 1 2 3 4 1234 |
she loves not she loves me she loves me she loves not she loves me she loves me |