Integers are given one per line. Stop reading when $0$ appears and print, one per line, every number given before that $0$ (the $0$ is not printed). A $0$ is guaranteed to appear.
Input
Several integers, one per line, each in $[0, 1000]$; a $0$ appears at least once.
Output
Print the integers before the first $0$, one per line.
Example 1
Input
3 7 2 0 9
Output
3 7 2
Discussion
Threads about this problem. Spoilers are collapsed; wrap hints in
||double bars||.No discussion yet. Start a thread if something here needs explaining.