import calendar
weeknames = ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY',
    'SATURDAY', 'SUNDAY')
d = input()
date = list(map(int, d.split()))
print(weeknames[calendar.weekday(date[2], date[0], date[1])])

159ebdbb9df985ab508b162f5dd32c32661e2759
<mask token>

<mask token>
print(weeknames[calendar.weekday(date[2], date[0], date[1])])

<mask token>
weeknames = ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY',
    'SATURDAY', 'SUNDAY')
d = input()
date = list(map(int, d.split()))
print(weeknames[calendar.weekday(date[2], date[0], date[1])])

import calendar
weeknames = ('MONDAY', 'TUESDAY', 'WEDNESDAY', 'THURSDAY', 'FRIDAY',
    'SATURDAY', 'SUNDAY')
d = input()
date = list(map(int, d.split()))
print(weeknames[calendar.weekday(date[2], date[0], date[1])])
