#include <iostream>
#include <cstdio>

using namespace std;

int main(void) {
	int mon[13], m, d, n;
	char w[7][10];
	mon[0] = 0;
	mon[1] = 31;
	mon[2] = 29;
	mon[3] = 31;
	mon[4] = 30;
	mon[5] = 31;
	mon[6] = 30;
	mon[7] = 31;
	mon[8] = 31;
	mon[9] = 30;
	mon[10] = 31;
	mon[11] = 30;
	mon[12] = 31;
	while (cin >> m >> d) {
		if (m == 0 && d == 0) {
			return 0;
		}
		n = 0;
		n += mon[m - 1] + d - 1;
		if (n % 7 == 0) {
		 printf("Thursday\n");
		}
		else if (n % 7 == 1) {
			printf("Friday\n");
		}
		else if (n % 7 == 2) {
			printf("Saturday\n");
		}
		else if (n % 7 == 3) {
			printf("Sunday\n");
		}
		else if (n % 7 == 4) {
			printf("Monday\n");
		}
		else if (n % 7 == 5) {
			printf("Tursday\n");
		}
		else if (n % 7 == 6) {
			printf("Wednesday\n");
		}
	}
}