#K51607. Print Palindromic Strings
Print Palindromic Strings
Print Palindromic Strings
Given a series of strings from standard input, your task is to print each string that is a palindrome. A string (s) is a palindrome if it reads the same forwards and backwards, i.e. (s = s^R). The input ends when the string "END" is encountered, and this termination marker should not be processed. Please output each palindromic string on a new line in the order they appear.
inputFormat
The input is provided via standard input and consists of several lines. Each line contains a single string. The input terminates with a line that contains exactly "END".
outputFormat
For every input string (except "END") that is a palindrome, output the string on its own line in the same order as the input.## sample
racecar
hello
level
END
racecar
level
</p>