
guess_count = 1
guess_limit = 3

while guess_count <= guess_limit:
    guess = int(input("Guess: "))
    guess_count += 1
    if guess == 9:
        print("You win!")
        break
else:
    print("You failed!")