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

int count_day(int a){
  int i;
 
  switch(a){
  case 1:
    i = 0;
    break;
  case 2:
    i = 31;
    break;
  case 3:
    i = 60;
    break;
  case 4:
    i = 91;
    break;
  case 5:
    i = 121;
    break;
  case 6:
    i = 152;
    break;
  case 7:
    i = 183;
  case 8:
    i = 213;
    break;
  case 9:
    i = 244;
    break;
  case 10:
    i = 274;
    break;
  case 11:
    i = 305;
    break;
  case 12:
    i = 335;
  default:
    i = 0;
  }

  return i;
}


int main(){
  int month, day, convert_day;

  while(scanf("%d %d", &month, &day) != EOF){

    if(month == 0) break;

    convert_day = count_day(month);
    day = convert_day + day;

  switch(day % 7){ //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;
  default:
    break;
  }
  }


  return 0;
}