Welcome to ZOJ
Information
Select Problem
Runs
Ranklist
ZOJ Problem Set - 3952
Fibonacci Sequence Chicken Edition

Time Limit: 1 Second      Memory Limit: 65536 KB      Special Judge

Year 2017 is the year of chicken, so in this problem we introduce you an interesting programming language: the Chicken Language.

Chicken is an esoteric programming language by Torbjörn Söderstedt, in which "chicken" is the only valid symbol. It is inspired by the paper and the presentation presented at the AAAS humor session by Doug Zongke. We strongly recommend you to watch the presentation after the contest. It's super fun.

The paper and the presentation by Doug Zongke.
From https://www.youtube.com/watch?v=yL_-1d9OSdk

As the original chicken language is a bit complicated, we specially designed the Simplified Chicken Language (SCL) for this problem. An SCL program is consisted of only two kinds of tokens: "c" and new line. The number of "c" tokens in the same line corresponds to an opcode. As the program is executed, it will push/pop values to/from a stack (the stack is empty at the beginning). The opcodes and the descriptions for each instruction of SCL are listed below.

Please keep in mind that the stack of the SCL is 1-based. That is to say, the index of the bottom of the stack is considered to be 1. In the following table, we indicate the integer at the top of the stack as x, and the integer just below the top of the stack as y. We also indicate stack[n] as the integer in the stack whose index is n.

Opcode Instruction Description
1AddPop x and y, and push x + y back to the stack. If there are less than two integers in the stack, the program will crash.
2SubtractPop x and y, and push x - y back to the stack. If there are less than two integers in the stack, the program will crash.
3ComparePop x and y. If x equals to y then push 1 onto the stack, otherwise push 0 onto the stack. If there are less than two integers in the stack, the program will crash.
4LoadLoad one integer from the standard input and push it onto the stack. If there is nothing to load, the program will crash.
5CopyPop x and y, and copy stack[y] to stack[x]. If there are less than two integers in the stack, the program will crash. If x or y is out of the range of the current stack, the program will also crash.
6JumpPop x and y. If y is not zero, the program will jump to the x-th line and continue to run. If x is larger than the number of lines of the program, the program will stop. If there are less than two integers in the stack, the program will crash. If x is not a positive integer, the program will also crash.
7+PushIf the Opcode is larger or equal to 7, push the integer Opcode - 7 onto the stack.

When the program stops, it will print out the integer at the top of the stack as the output.

What you need to do is to write an SCL program which can print out the n-th element of the fibonacci sequence. Recall that a fibonacci sequence is a sequence which satisfies f(1) = f(2) = 1 and f(n) = f(n - 1) + f(n - 2) when n ≥ 3.

As the online judge system of the contest does not support SCL, you're supposed to print out your SCL program using other languages like C or C++. A specially designed program will then judge the correctness of your output.

Input

There is no input for your C/C++/etc. program.

For your SCL program, only one integer n (1 ≤ n ≤ 30) will be given in the standard input, indicating the index of the element in the fibonacci sequence.

Output

Your C/C++/etc. program should output your SCL program.

Please output your SCL program in the correct format. If your program contains tokens other than "c" or new line (for example, space), or you print extra empty lines at the end of your output, you will get a "wrong answer" verdict.

Also, your SCL program should contain no more than 104 "c" tokens, and your SCL program can execute at most 103 lines of code for each SCL test case, or you will get a "wrong answer" verdict.

Note that if your SCL program crashes due to various reasons, you will still get a "wrong answer" verdict as this problem is special judged.

Your SCL program should print out only one integer f(n), which is the n-th element of the fibonacci sequence.

Sample Output

cccc
ccccccc
cccccccc
ccccccccc
ccccc
ccccccccc
ccc
cccccccccccccccccccccc
cccccc
ccccccccc
c

Hint

Please note that the sample output is only to show you the output format, and it is NOT A CORRECT ANSWER!

What the sample SCL program do is to read an integer from the standard input and check if the integer equals to 2. If it does, then print out the integer directly, otherwise add 2 to the integer and print it out. You can try to figure out how this SCL program works, as it may help you to understand the problem better.


Author: WENG, Caizhi
Source: The 17th Zhejiang University Programming Contest Sponsored by TuSimple
Submit    Status