from datetime import date
def solution(a, b):
answer = ['MON','TUE','WED','THU','FRI','SAT','SUN']
return answer[date(2016,a,b).weekday()]
def getDayName(a,b):
months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
days = ['FRI', 'SAT', 'SUN', 'MON', 'TUE', 'WED', 'THU']
return days[(sum(months[:a-1])+b-1)%7]