Chat in Telegram

Move all zeros to the end

EASY

Given an input string with numbers separated by a single space.

Move all zeros to the end. The solution should maintain the relative order of items in the line.

Example #1

Input

7 0 39 0 282 2 4 0 45

Output

7 39 282 2 4 45 0 0 0

Solution