#include <iostream>
using namespace std;

int main() {
	int mth[12]={31,29,30,30,31,30,31,31,30,31,30,31};
	char wks[][16]={"Wedneday","Thursday","Friday","Sutursday","Sunday",
				"Monday","Tuesday"};
	int m,d;
	while(cin>>m>>d,m){
		int days=0;
		for(int i=0;i<m-1;i++) days+=mth[i];
		days+=d; cout<<wks[days%7]<<endl;
	}
}