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

string dia_de_la_setmana(int d, int m, int a);

int main()
{
    int d, m, a;
    while (cin >> d >> m >> a) {
        cout << dia_de_la_setmana(d, m, a) << endl;
    }
    return 0;
}
