#K66017. Lexicographically Smallest Character

    ID: 32327 Type: Default 1000ms 256MiB

Lexicographically Smallest Character

Lexicographically Smallest Character

Given a string S, you can perform any number of operations to select a single character from it. Your task is to find the lexicographically smallest character in S. More formally, if the string consists of characters \(S = s_1s_2\ldots s_n\), you need to print the character \(c\) such that \(c = \min\{s_1, s_2, \dots, s_n\}\) in lexicographical order.

You will be given multiple test cases. For each test case, the process is the same. Ensure that your solution reads input from stdin and prints the output to stdout.

inputFormat

The first line contains an integer \(T\) representing the number of test cases. Each of the following \(T\) lines contains a non-empty string \(S\).

Note: The input is provided via stdin.

outputFormat

For each test case, output the lexicographically smallest character in the given string on a new line, via stdout.

## sample
3
ab
Ba
aAb
a

B A

</p>