#include <iostream>
using namespace std;

int month_day[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

int main(){
    int m, d;
    int day;

    while(1){
        day = 0;
        cin >> m >> d;
        if(m == 0 && d == 0) break;

        for(int i=1; i<m; i++){
            day += month_day[i-1];
        }
        day += d;

        switch(day % 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;
}