#C11594. Lexicographically Smallest Character

    ID: 40927 Type: Default 1000ms 256MiB

Lexicographically Smallest Character

Lexicographically Smallest Character

In this problem, you are given T non-empty strings consisting of lowercase English letters. Your task is to find and output the lexicographically smallest character from each string. You are allowed to perform any operations such as rearranging the characters to determine the smallest one. In mathematical terms, for a given string s, you must find (\min{s_i \mid 1 \le i \le |s|}), where (s_i) represents the characters of s.

inputFormat

The first line of input contains a single integer T (1 ≤ T ≤ 10^5) representing the number of test cases. Each of the following T lines contains a non-empty string s consisting of lowercase English letters.

outputFormat

For each test case, output a single line containing the lexicographically smallest character of the given string.## sample

2
acbd
zxy
a

x

</p>