Tic-Tac-Toe & Alphabets

3.3

24 votes
Very-Easy
Problem

Tic-Tac-Toe are three cousins. They planned to play cricket this afternoon but got stuck in their homework. Mrs. Jaime assigned them a task to arrange all the letters in a scrambled word in the order of their appearance in english alphabets. All the letters are in upper-case. Help Tic-Tac-Toe to solve their homework so that they can play cricket.

Input: First line of the input contains T, followed by T lines, each containing a scrambled word in upper-case.

Output: T lines, each containing arranged words.

Constraints: 1 <= T <= 500 | S <= 10^3 , Where S: Length of each scrambled word.

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

For the 1st test case, INDIA can be arranged as ADIIN.
For the 2nd test case, PROGRAM can be arranged as AGMOPRR.

Editor Image

?