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

int main()
{
    string day[]={"Wednesday","Thirsday","Friday","Saturday","Sunday","Monday","Tuesday"};
    int Mon[13]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    int m,d;
    while(cin>>m>>d,m){
        int allDay=d;
        for(;m>0;m--){
            allDay += Mon[m-1];
        }
        cout<<day[allDay%7]<<endl;
    }
}