uses crt;
var n,x: byte;
Begin
readln(n);
x:= (n-1) mod 7;
if x=0 then write('MONDAY');
if x=1 then write('TUESDAY');
if x=2 then write('WEDNESDAY');
if x=3 then write('THURSDAY');
if x=4 then write('FRIDAY');
if x=5 then write('SATURDAY');
if x=6 then write('SUNDAY');
readln;
End.