Code for hangman working