When dealing with loops, it’s possible to nest conditions in loops, loops in other loops, and virtually any construct we have learned so far as long as the syntax is correct. We can also mix for loops with while loops and conditions within a single program.

for number in range(100, 115, 2):
print('Number:', number, end='::')
while number > 0:
print(number % 10, end='-')
number //= 10
print()
print('The End!')

So, the program iterates over even numbers ranging from 100 to 114 inclusive. It then generates the individual digits of those numbers and prints them one by one.

Challenge

Given n integers, you are asked to perform the following operations for each number:

Multiply each digit by 2

Print the resulting sequence of digits in reverse order

The first line of the input contains a single integer n. The next n lines contain integers for which you need to perform the operations.

The program should print n lines containing the result of the operations for each integer in the sequence.