Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/while-raqamlarni-teskari-tartibda-chiqarish

Digits in reverse order

Easy 1000 ms 64 MB 29%
Share

A positive integer $n$ is given. Print all its digits from right to left.

Extracting the digits of a number from right to left

Input

One integer $n$.

Output

One line with the sequence of digits separated by spaces.

Note

$1 \le n \le 2 * 10^{9}$

Examples

Input #1
1234
Output #1
4 3 2 1
Input #2
508
Output #2
8 0 5

Sign in to submit a solution

Signing up is free and takes a minute.