import random

number = random.randint(1, 5)

while True:
    guess = int(input("Guess the number between 1 and 5: "))
    if guess == number:
        print("Congratulations! You guessed the number correctly.")
        break
    else:
        print("Wrong guess. Try again!")