N=int(input()) A=["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] print(A[(N+2)%7])