program ponedilok;
var k,d:integer;
begin
writeln ('vvedit nomer dnia');
readln (k);
if (k>=1) and (365>=k) then
d:= k mod 7;
if d=2 then writeln ('vivtorok');
if d=3 then writeln ('sereda');
if d=4 then writeln ('chetver');
if d=5 then writeln ('piatnitsa');
if d=6 then writeln ('sybota');
if d=0 then writeln ('nedilia');
if d=1 then writeln ('ponedilok');
readln
end.