Python script to solve hangman game