A program to win a game of hangman