# Ask the user for the current hour
current_hour = int(input("Please enter the current hour (0-23): "))

# Check the time of day and print the corresponding greeting
if 5 <= current_hour <= 11:
    print("Good morning!")
elif 12 <= current_hour <= 17:
    print("Good afternoon!")
elif 18 <= current_hour <= 21:
    print("Good evening!")
elif 22 <= current_hour <= 23 or 0 <= current_hour <= 4:
    print("Good night!")
else:
    print("Invalid input")