9507: ABC344 —— B - Delimiter
[Creator : ]
Description
You are given $N$ integers $A_1,A_2,\dots,A_N$, one per line, over $N$ lines. However, $N$ is not given in the input.
Furthermore, the following is guaranteed:
- $A_i \neq 0$ ( $1 \le i \le N-1$ )
- $A_N = 0$
Print $A_N, A_{N-1},\dots,A_1$ in this order.
Furthermore, the following is guaranteed:
- $A_i \neq 0$ ( $1 \le i \le N-1$ )
- $A_N = 0$
Print $A_N, A_{N-1},\dots,A_1$ in this order.
Input
The input is given from Standard Input in the following format:
```
$A_1$
$A_2$
$\vdots$
$A_N$
```
```
$A_1$
$A_2$
$\vdots$
$A_N$
```
Output
Print $A_N, A_{N-1}, \dots, A_1$ in this order, as integers, separated by newlines.
Constraints
- All input values are integers.
- $1 \le N \le 100$
- $1 \le A_i \le 10^9$ ( $1 \le i \le N-1$ )
- $A_N = 0$
- $1 \le N \le 100$
- $1 \le A_i \le 10^9$ ( $1 \le i \le N-1$ )
- $A_N = 0$
Sample 1 Input
3
2
1
0
Sample 1 Output
0
1
2
3
Note again that N is not given in the input. Here, N=4 and A=(3,2,1,0).
Sample 2 Input
0
Sample 2 Output
0
A=(0).
Sample 3 Input
123
456
789
987
654
321
0
Sample 3 Output
0
321
654
987
789
456
123