//58
#include<iostream>

using namespace std;

int main(){
  int dn[13][32];
  int i=3;
  for(int m=1;m<13;m++){
    static const int dom[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
    for(int d=1;d<=dom[m];d++){
      dn[m][d]=i++;
      i%=7;
    }
  }
  for(int m,d;cin>>m>>d,m;){
    static const char *ds[]={"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
    cout<<ds[dn[m][d]]<<endl;
  }
  return 0;
}