Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"time"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtoi ...
func Sliceconvtoi() []int {
	strs := strings.Split(sc.Text(), " ")

	var ints []int
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		ints = append(ints, x)
	}

	return ints
}

func main() {
	for sc.Scan() {
		var dt string
		i := Sliceconvtoi()
		t := time.Date(2017, 9, i[0], 0, 0, 0, 0, time.Local)

		switch t.Weekday() {
		case time.Monday:
			dt = "mon"
		case time.Tuesday:
			dt = "tue"
		case time.Wednesday:
			dt = "wed"
		case time.Thursday:
			dt = "thu"
		case time.Friday:
			dt = "fri"
		case time.Saturday:
			dt = "sat"
		case time.Sunday:
			dt = "sun"
		default:
		}

		fmt.Println(dt)
	}

}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>

using namespace std;

#define ll long long
#define ld long double
#define EPS 0.0000000001
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef vector<pii> vp;

int gcd(int a, int b){
    if(b==0) return a;
    return gcd(b,a%b);
}
int lcm(int a, int b){
    return a/gcd(a,b)*b;
}


signed main(void) {
    int n;
    cin >> n;
    switch (n%7) {
        case 0:cout << "thu";break;
        case 1:cout << "fri";break;
        case 2:cout << "sat";break;
        case 3:cout << "sun";break;
        case 4:cout << "mon";break;
        case 5:cout << "tue";break;
        case 6:cout << "wed";break;
    }
    cout << endl;
}

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

int main() {
  const string s[] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
  int x;
  cin >> x;
  cout << s[x % 7] << "\n";
}

C++: #include<iostream>
 
 using namespace std;

 int main(){
    int N;
    cin>>N;

    switch(N%7){
        case 2 : cout<<"sat\n"; break;
        case 3 : cout<<"sun\n"; break;
        case 4 : cout<<"mon\n"; break;
        case 5 : cout<<"tue\n"; break;
        case 6 : cout<<"wed\n"; break;
        case 0 : cout<<"thu\n"; break;
        case 1 : cout<<"fri\n"; break;
        default : break;
    }
}

C++: #include <iostream>

using namespace std;

int main ()
{
	int n;
	cin >> n;

	int k = 0;
	k = n % 7;
	if (k == 2)
	{
		cout << "sat" << endl;
	}
	else if (k == 1)
	{
		cout << "fri" << endl;
	}
	else if (k == 0)
	{
		cout << "thu" << endl;
	}
	else if (k == 6)
	{
		cout << "wed" << endl;
	}
	else if (k == 5)
	{
		cout << "tue" << endl;
	}
	else if (k == 4)
	{
		cout << "mon" << endl;
	}
	else
	{
		cout << "sun" << endl;
	}
}

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

int main() {
  int x;

  vector<string> v{"thu", "fri", "sat", "sun", "mon", "tue", "wed"};

  cout << v[x % 7] << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int x;
    cin>>x;
    if(x%7==0){
        cout<<"thu"<<endl;
    }
        if(x%7==1){
        cout<<"fri"<<endl;
    }
        if(x%7==2){
        cout<<"sat"<<endl;
    }
        if(x%7==3){
        cout<<"sun"<<endl;
    }
        if(x%7==4){
        cout<<"mon"<<endl;
    }
        if(x%7==5){
        cout<<"tue"<<endl;
    }
        if(x%7==6){
        cout<<"wed"<<endl;
    }
    
}

C++: //============================================================================
// Name        : AOL.cpp
// Author      : Akari Fujii
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <cctype>
#include <algorithm>
using namespace std;
typedef long long ll;

int main() {


	int x;
	cin>>x;

	if(x==4||x%7==4){
		cout<<"mon"<<endl;
	}else if(x==5||x%7==5){
		cout<<"tue"<<endl;
	}else if(x==6||x%7==6){
		cout<<"wed"<<endl;
	}else if(x%7==0){
		cout<<"thu"<<endl;
	}else if(x==1||x%7==1){
		cout<<"fri"<<endl;
	}else if(x==2||x%7==2){
		cout<<"sat"<<endl;
	}else if(x==3||x%7==3){
		cout<<"sun"<<endl;
	}




}

C++: #include<iostream>
using namespace std;

int main(){
     int x;

     cin >> x;

     if(x%7 == 4){
    	 cout << "mon" << endl;
     }
     if(x%7 == 5){
    	 cout << "tue" <<endl;
     }
     if(x%7 == 6){
    	 cout << "wed"<<endl;
     }
     if(x%7 == 0){
    	 cout << "thu"<<endl;
     }
     if(x%7 == 1){
    	 cout <<"fri"<<endl;
     }
     if(x%7 == 2){
    	 cout <<"sat"<<endl;
     }
     if(x%7 == 3){
    	 cout <<"sun"<<endl;
     }

     return 0;

}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
#define FOR(i,a,n) for(int (i)=(a);(i)<(n);(i)++)
#define eFOR(i,a,n) for(int (i)=(a);(i)<=(n);(i)++)
#define rFOR(i,a,n) for(int (i)=(n)-1;(i)>=(a);(i)--)
#define erFOR(i,a,n) for(int (i)=(n);(i)>=(a);(i)--)
#define SORT(i) sort((i).begin(),(i).end())
#define rSORT(i,a) sort((i).begin(),(i).end(),(a))
#define all(i) (i).begin(),(i).end()
constexpr ll INF = 1000000000;
constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; }return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; }return 0; }
inline void init() { cin.tie(nullptr); cout.tie(nullptr); cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(15); }
template<class T>inline istream& operator>>(istream& input, vector<T>& v) { for (auto& elemnt : v)input >> elemnt; return input; }

int main() {
    init();
    
    int x;
    cin >> x;

    vector<string> ans = { "thu","fri","sat","sun","mon","tue","wed" };
    cout << ans[x % 7] << "\n";
}