import random

def guess_number():
    # Generate a random number between 1 and 100
    secret_number = random.randint(1, 100)
    attempts = 5  # Number of attempts allowed
    print("Welcome to the Number Guessing Game!")
    print("I've selected a number between 1 and 100. You have 5 attempts to guess it.")

    # Loop until the user runs out of attempts or guesses the correct number
    while attempts > 0:
        try:
            guess = int(input("Enter your guess: "))
            if guess == secret_number:
                print("Congratulations! You guessed the correct number:", secret_number)
                return
            elif guess < secret_number:
                print("Too low! Try again.")
            else:
                print("Too high! Try again.")
            attempts -= 1
            print("Remaining attempts:", attempts)
        except ValueError:
            print("Invalid input. Please enter a valid number.")
    
    print("Sorry, you've run out of attempts. The correct number was", secret_number)

def main():
    while True:
        guess_number()
        play_again = input("Do you want to play again? (yes/no): ")
        if play_again.lower() != 'yes':
            print("Thank you for playing!")
            break

if __name__ == "__main__":
    main()
