#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (int i = 0; i < (n); i++)

const int month[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30};
int main()
{
  int m, d, cntdays = 0;
  
  while (cin >> m >> d, m + d){
    cntdays = month[m - 1] + d;
    switch (cntdats % 7){
      case 1:
        cout << Monday;
        break;
      case 2:
        cout << Tuesday;
        break;
      case 3:
        cout << Wednesday;
        break;
      case 4:
        cout << Thursday;
        break;
      case 5:
        cout << Friday;
        break;
      case 6:
        cout << Saturday;
        break;
      case 0:
        cout << Sunday;
        break;
      cout << endl;
    }
  }
}