﻿from datetime import date as d;x,s=map(int,input().split());print(d.ctime(d(2007,x,s))[0:3].upper())
7609a809592954d7477892283525318d371ee2c4
﻿from datetime import date as d;x,s=map(int,input().split());print(d.ctime(d(2007,x,s))[0:3].upper())