#C13968. Palindrome Filter
Palindrome Filter
Palindrome Filter
Given a list of words, your task is to filter out the words that are palindromes. A palindrome is a word that reads the same forwards and backwards, ignoring case. You are not allowed to use built-in string reversal methods.
The input consists of an integer n on the first line, followed by n words (one per line). Your program should output the palindromic words in their original order separated by a single space. If there are no palindromes, output an empty line.
Recall that a string \( s \) is a palindrome if for all indices \( i \), \( s[i] = s[|s|-i-1] \) (comparison is case-insensitive).
inputFormat
The first line contains an integer n representing the number of words. The following n lines each contain one word.
outputFormat
Output the filtered palindromic words in their original order, separated by a single space. If there are no palindromic words, output an empty line.
## sample6
Racecar
hello
Level
world
noon
Python
Racecar Level noon