input x
a=x mod 7
if a=0
print"Sunday"
if a=1
print"Monday"
if a=2
print"Tuseday"
if a=3
print"Wednsday"
if a=4
print"Thursday"
if a=5
print"Friday"
else
print"Saturday"
end
input x
a=x mod 7
if a=0
print"Sunday"
if a=1
print"Monday"
if a=2
print"Tuseday"
if a=3
print"Wednsday"
if a=4
print"Thursday"
if a=5
print"Friday"
else
print"Saturday"
end