Sorting is considered to be one of the most important skills to be learned in computer science and has it's applications in real product building.
The problem has arised to the team of PcCube.They need to sort the set of alphanumeric strings in such a way that the positions of alphabets and numbers remains unchanged.
First line of the input contains T , i.e. number of test cases.Then next T lines contains a string S.
Output the sorted form of S such that the positions of alphabets and numbers remains unchanged.
- 1 ≤ T ≤ 100
- 1 ≤ N ≤ 1000000
Input: 1 951f5gd3 Output: 135d5fg9
|Time Limit:||0.2 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, PRLG, ST, LUA, JS, ERL, TCL, TEXT, FS|
Fetching successful submissions