#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> pint;
#define rep(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};

int day[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
int main(){
	int m,d;
	for(;cin>>m>>d,m;){
		for(int i=1;i<m;i++){
			d+=day[i];
		}
		switch(d%7){
		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;
}