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 have selected a number between 1 and 100. You have 5 attempts to guess it.")

    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("Attempts remaining:", attempts)
        except ValueError:
            print("Invalid input! Please enter a valid number.")

    print("Sorry, you've run out of attempts!")
    print("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("Thanks for playing! Goodbye.")
            break

if __name__ == "__main__":
    main()
