import random

def number_guessing_game():
    lower_limit = 1
    upper_limit = 100
    attempts = 5

    print("Welcome to the Number Guessing Game!")
    print(f"I'm thinking of a number between {lower_limit} and {upper_limit}.")

    secret_number = random.randint(lower_limit, upper_limit)

    while attempts > 0:
        print(f"You have {attempts} attempts left.")
        guess = int(input("Enter your guess: "))

        if guess < secret_number:
            print("Too low! Try again.")
        elif guess > secret_number:
            print("Too high! Try again.")
        else:
            print("Congratulations! You guessed the number!")
            return

        attempts -= 1

    print("Sorry, you've run out of attempts. The correct number was", secret_number)

def main():
    while True:
        number_guessing_game()
        play_again = input("Do you want to play again? (yes/no): ").lower()
        if play_again != 'yes':
            break

if __name__ == "__main__":
    main()
