You are about to make a delicious sandwich with
At the end of it all, you wish to observe your delicious sandwich – output the layers of the sandwich from top to bottom.
Input Specification
The integer 1
s and 0
s describing the process you followed creating the sandwich. The 0
indicates you are putting the layer at the bottom of the sandwich, and 1
indicates you are putting it at the top.
Output Specification
The layers of the sandwich, in order from top to bottom.
Sample Input
Copy
5
00110
Sample Output
Copy
4
3
1
2
5
Comments