#C4684. Taco Scroll Decoding

    ID: 48249 Type: Default 1000ms 256MiB

Taco Scroll Decoding

Taco Scroll Decoding

You are given an enchanted scroll that contains a sequence of distinct digits in a random order. Your task is to decipher the scroll by determining which digits are present and then outputting them in ascending order.

For each test case, you will be provided with a single encoded string. The string contains digits (0-9) that appear at most once. You must sort these digits in increasing order and print the resulting string.

Note: If a digit is not present in the string, simply ignore it. The solution should read from stdin and write to stdout.

The challenge can be mathematically expressed as follows:

Given an encoded string S that is a permutation of a subset of digits, you need to compute \[ output = \text{sorted}(S) \] and print the resulting string.

inputFormat

The input is read from stdin and consists of the following:

  • The first line contains an integer T representing the number of test cases.
  • Each of the next T lines contains a single string representing the encoded scroll. The string consists only of digits and each digit appears at most once.

outputFormat

For each test case, output a single line to stdout containing the sorted sequence of digits in ascending order.

## sample
1
9731
1379

</p>