Expression Evaluation
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Expression evaluation is a classic problem. In this problem, you only need to evaluate an expression of length less than . It only contains non-negative integers (possibly with leading zeros), `+'s, `-'s and `*'s, i.e., it satisfies the following grammar:
<expression>:= <term>|<expression>+<term>|<expression>-<term>
      <term>:= <number>|<term>*<number>
    <number>:= <digit>|<number><digit>
     <digit>:= 0|1|2|3|4|5|6|7|8|9

For example,013, 0213-2132*0213 are valid, but -2132 and 32113+-3213 are invalid.

The result of the evaluation may be too large or negative. Output the result modulo  to avoid overflow since you will use a 32-bit machine.

The 32-bit machine contains units of memory, denoted as , , , . Each unit is a 32-bit unsigned number, also an instruction.

In each cycle, let , the machine execute the instruction .
Let at the beginning of cycle, where a, b, c, d are non-negative integers and less than :
  • If , the machine outputs the value of and stops.
  • If , and then:
            – If there are no characters in input left, set to ;
            – Otherwise, set to the ASCII code of the next character of input, and then set to .
  •  If , set to , and then set to .
  •  If , and then:
            – If , set to the value of ;
            –  Otherwise, set to the value of .

Note that if in some instructions, may be set more than once. Its value is the value set last after the cycle.

You need to set the initial value for each unit such that the machine can stop in finite cycles and output the result of expression modulo .

Since there is a time limit for a problem. In this problem, the machine can execute at most cycles.

输入描述:

The only line contains a 32-bit unsigned integer - the seed for the expression generator.

You do not need to use it. It is just for the checker to generate the expressions

输出描述:

Output  32-bit unsigned integers in the only line - the initial values of the memory units.
示例1

输入

复制
0

输出

复制
0 0 ... 0 (1024 zeros)

说明

The output in the example is wrong, just for explaining the output format