import string

orig_str = input('Input a string: ')
mod_str = orig_str.lower()

bad_chars = string.whitespace + string.punctuation

for char in mod_str:
    if char in bad_chars:
        mod_str = mod_str.replace(char, '')
        print("Modded string: ", mod_str)

if(mod_str == mod_str[::-1]):
    print("'"+orig_str+"'", "is a palindrome.")
else:
    print("'"+orig_str+"'", "is not a palindrome.")
