Day Name-2

 Day Name-2:

given the weekend of the first day of the month.Determine the day of the week of the given date in the month.


d=input()

l=[]

n=int(input())

n=n%7

a=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]

s=a.index(d)

l.append(s)

for i in range(6):

    s=s+1

    l.append((s)%7)

print(a[l[n%7]-1])

Comments