The following is the code:
pyg = 'ay'
new_word = word[1:len(word)] + first + pyg
original = raw_input('Enter a word:')
if len(original) > 0 and original.isalpha():
print original
word = original.lower()
first = word[0]
print new_word
else:
print 'empty'