#include <iostream>
using namespace std;

int search(int a){
	int month;
	if(a==2) month = 29;
	else if(a%2!=0) month = 31;
	else month = 30;
	return month;
}

char *Whatday(int a,int b){
	int month;
	char *day;
	int date=0;
	
	for(int i=1;i<a;i++){
		date = date+search(i);
	}
	date += b;
	switch(date%7){
		case 0: day ="Wednesdayday"; break;
		case 1: day ="Thursday"; break;
		case 2: day ="Friday"; break;
		case 3: day ="Saturday"; break; 
		case 4: day ="Sunday"; break;
		case 5: day ="Monday"; break;
		case 6: day ="Tuesday"; break;
	}
	return day;
}

int main() {
	int m,d;
	while(1){
		cin >> m >> d;
		if(m==0&&d==0) break;
		cout << Whatday(m,d) << endl;
	}
	return 0;
}
