#C3992. String Formatter
String Formatter
String Formatter
Given a string S that may contain letters, digits, punctuation, and other non-alphanumeric characters, the task is to remove all characters that are not digits or alphabetical letters and then convert all letters to lowercase. This operation is fundamental in text preprocessing.
For each test case, you will be provided with a string S. Your algorithm should produce a formatted string where only alphanumeric characters appear, and any uppercase letters have been converted to lowercase.
The processing can be described by the following formula in LaTeX:
$$\text{formatted} = \text{join}(\text{lower}(c)\; |\; c \in S \text{ and } c \text{ is alphanumeric}) $$inputFormat
Input is read from standard input. The first line contains an integer T, representing the number of test cases. Each of the following T lines contains a single string S that may include spaces and punctuation.
outputFormat
For each test case, output the formatted string on a new line on standard output.## sample
3
Hello, World!
Python_3.8
123 ABC !!
helloworld
python38
123abc
</p>