Bunny Rabbit

0

0 votes
Very-Easy
Problem

Bunny rabbit lived in the forest. He had many friends. He was proud of his friends. One day Bunny rabbit heard the loud barking of wild dogs. He was very scared. He decided to ask for help. He quickly went to his friend deer. He said, “Dear friend, some wild dogs are chasing me. Can you chase them away with your sharp antlers?” Deer was busy at the time in solving a puzzle and will go for help only when someone else will solve the puzzle. Can you solve the puzzle so that deer can help Bunny. The puzzle is such as he has a Number N and he has to print the minimum possible number that can be formed after reshuffling of digits of N.

Input:

The first line contains a Integer T, no of TestCases.
Each of the next T line contain a single integer N(Number).

Output:

Print T line, Each line having minimum number after reshuffling.

Constraints:

1 <= T <= 10^5
0 <= N <= 10^100
1 <= Digits of N <= 9
Time Limit: 1
Memory Limit: 256
Source Limit:
Editor Image

?