#C9695. Mirrored String
Mirrored String
Mirrored String
Given a string, determine if it is a mirrored string. A mirrored string is one that reads the same forwards and backwards when ignoring spaces, punctuation, and case differences. In other words, if you remove all non-alphanumeric characters and convert all letters to lower case, the resulting string should be equal to its reverse. Mathematically, if $$cleaned = reverse(cleaned)$$, then the string is mirrored. Output MIRRORED
if it is a mirrored string, and NOT MIRRORED
otherwise.
inputFormat
The input consists of a single line containing the string to be tested. The string can contain letters, digits, spaces, punctuation, or could even be empty.
outputFormat
Output a single line: MIRRORED
if the processed string is equal to its reverse, otherwise output NOT MIRRORED
.## sample
A man, a plan, a canal, Panama
MIRRORED