#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <algorithm>
using namespace std;

int main() {
  int month[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
  string day[] = {"Wednesday", "Thursday", "Friday", "Saturday", "Sunday", "Monday", "Tuesday"};
  int m, d;
  for(;;) {
    int ans = 0;
    cin >> m >> d;
    if(m == 0 || d == 0) break;
    for(int i=1; i<m; ++i) ans += month[i];
    ans += d;
    cout << day[ans % 7] << endl;
  }
}


