hours = int(input())
day_of_week = str(input())

work_days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]

if 10 <= hours <= 18 and day_of_week in work_days:
    print("open")
else:
    print("closed")
