a=['Wednesday','Thursday','Friday','Saturday','Sunday','Monday','Tuesday',0]

while True:

    q=list(map(int,input().split()))

    if sum(q) == 0: break

    print(a[(sum([0,31,29,31,30,31,30,31,31,30,31,30,31][:q[0]])+q[1])%7])
while True:

    q=list(map(int,input().split()))

    if sum(q) == 0: break

    print(['Wednesday','Thursday','Friday','Saturday','Sunday','Monday','Tuesday',0][(sum([0,31,29,31,30,31,30,31,31,30,31,30,31][:q[0]])+q[1])%7])
a = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", 0]
while True:
    q = list(map(int, input().split()))
    if sum(q) == 0:
        break
    print(
        a[(sum([0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][: q[0]]) + q[1]) % 7]
    )

while True:
    q = list(map(int, input().split()))
    if sum(q) == 0:
        break
    print(
        [
            "Wednesday",
            "Thursday",
            "Friday",
            "Saturday",
            "Sunday",
            "Monday",
            "Tuesday",
            0,
        ][(sum([0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][: q[0]]) + q[1]) % 7]
    )

-a = ["Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday", 0] -        a[(sum([0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][: q[0]]) + q[1]) % 7] +        [ +            "Wednesday", +            "Thursday", +            "Friday", +            "Saturday", +            "Sunday", +            "Monday", +            "Tuesday", +            0, +        ][(sum([0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][: q[0]]) + q[1]) % 7]