#C14595. Palindromic Strings Filter
Palindromic Strings Filter
Palindromic Strings Filter
Given a series of strings, your task is to filter out and output only the palindromic strings. A string is considered a palindrome if it reads the same forwards and backwards. In formal terms, a string \( s \) is a palindrome if \( s = s^R \), where \( s^R \) denotes the reverse of \( s \).
The input is read from the standard input (stdin) and the output should be written to the standard output (stdout). Each palindromic string must be printed on a new line in the order they appear in the input. If no string is a palindrome, the program should not output anything.
inputFormat
The first line of the input contains an integer \( n \) representing the number of strings. The following \( n \) lines each contain a single string.
outputFormat
For each palindromic string in the given list, print the string on a new line. If no palindromic strings exist, output nothing.
## sample5
level
test
rotor
hello
mom
level
rotor
mom
</p>