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