def solution(a, b):
    day=0
    month_dict={1:31,2:29,3:31,4:30,5:31,6:30,7:31,8:31,9:30,10:31,11:30}
    day_dict={1:'FRI',2:'SAT',3:'SUN',4:'MON',5:'TUE',6:'WED',0:'THU'}
    for i in range(1,a):
        day+=month_dict[i]
    day+=b
    return day_dict[day%7]
