#!/usr/bin/python

def isPalindrome (word):
    i = 0
    j = len(word) -1
    while i<j:
        if word[i] != word[j]:
            return False
        i = i+1
        j = j-1
    return True

word = ''
while word != 'quit':
    word = raw_input('Type a word, or "quit" to exit: ')
    if isPalindrome (word):
        print word, ' is a palindrome'
    else:
        print word, ' is not a palindrome'
    
    
print 'Quitting'
