program day;
uses crt;
const
week: array[1..7] of string[10] = ('Monday','Tuesday','Wensday','Thursday','friday','satuday','sunday');
var
n,d:integer;
begin clrscr ;
write('nr ?? '); readln(n);
d:=(n mod 7);
if d<>0 then writeln(week[d])
else writeln(week[7]);
readln;
end.