Completed guessing game solution