Sorting

tahmidrafi SCB-PA Inter School and C...
Limits 2s, 512 MB

You will be given a string containing small letters and digits. You have to sort the letters and digits in ascending order, without changing the relative position of the letters and digits. Please check the sample input and output if you are confused.

Input

First line will contain an integer N. Each of the next N line will contain a string of letters and digits. Maximum length of the string will be 79.

Output

N lines, each line is the sorted string according to the problem description.

Sample

InputOutput
2
a2c1b
ai5d2k3x325x
a1b2c
ad2i2k3x355x

Submit

Login to submit.

Statistics

86% Solution Ratio
TEAM_CCSEarliest, Oct '18
TEAM_CCSFastest, 0.0s
mdshadeshLightest, 9.1 kB
white_monsterShortest, 173B
Toph uses cookies. By continuing you agree to our Cookie Policy.