Program to convert words into numbers and reverse