import time,datetime while True: try: n,y,r = map(int, input().split()) res = datetime.datetime(n,y,r).strftime("%A") print(res) except: break