#include <iostream>
#include <string>
using namespace std;

string week[] = {"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"};
int days[] = {31,29,31,30,31,30,31,31,30,31,30,31};

int main(){
    int month, day;
    while(cin >> month >> day, month+day){
        int n = 0;
        for(int i=1; i<month; i++){
            n += days[i-1];
        }
        n += day;
        n %= 7;
        cout << week[n] <<endl;
    }
    return 0;
}