i=int(input())
if i == 1:
print("Monday")
elif i == 2:
print("Tuesday")
elif i == 3:
print("Wednesday")
elif i == 4:
print("Thursday")
elif i == 5:
print("Friday")
elif i == 6:
print("Saturday")
elif i == 7:
print("Sunday")
i=int(input())
if i == 1:
print("Monday")
elif i == 2:
print("Tuesday")
elif i == 3:
print("Wednesday")
elif i == 4:
print("Thursday")
elif i == 5:
print("Friday")
elif i == 6:
print("Saturday")
elif i == 7:
print("Sunday")