#include<iostream>
using namespace std;

int main()
{
	int day[365];
	int month[12] = {0,31,60,91,121,152,182,212,243,273,304,334};
	int m,d;
	
	for(int i=0;i<365;++i)
		day[i] = i%7;
	
	while(cin >> m >> d){
		if(!m & !d)
			break;

		switch(day[month[m-1] + d]){
		case 0:cout <<"Wednesday"	<<endl;break;
		case 1:cout <<"Thursday"		<<endl;break;
		case 2:cout <<"Friday"			<<endl;break;
		case 3:cout <<"Saturday"		<<endl;break;
		case 4:cout <<"Sunday"			<<endl;break;
		case 5:cout <<"Monday"			<<endl;break;
		case 6:cout <<"Tuesday"			<<endl;break;
		}

	}
	return 0;
}