#include <iostream>
using namespace std;
int main(){
  int m,d,s[]={0,31,29,31,30,31,30,31,31,30,31,30};
  string day[]={"Thursday","Friday","Saturday","Sunday","Monday","Tuesday","Wednesday"};
  for(;cin>>m>>d,m||d;)
    {
      d--;
      for(int i=0;i<m;i++)
	d+=s[i];
      cout<<day[d%7]<<endl;
    }
  return 0;
}