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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repo(j,o,n) for(int j=o;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define MOD 1000000007
#define INF 9223372036854775807

signed main()
{
  int x=0,y=0,z=0,w=0;
std::cin >> x;
for(;;){
  if(x-7>0){
    x-=7;
  }else{
    break;
  }
}
 if(x==1)std::cout << "fri" << '\n';
else if(x==2)std::cout << "sat" << '\n';
else if(x==3)std::cout << "sun" << '\n';
else if(x==4)std::cout << "mon" << '\n';
else if(x==5)std::cout << "tue" << '\n';
else if(x==6)std::cout << "wed" << '\n';
else if(x==7)std::cout << "thu" << '\n';
else if(x==8)std::cout << "fri" << '\n';
else std::cout << "sat" << '\n';
}

C++: #include<iostream>
using namespace std;
int main(void){
    string D[] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
    int x; 
    cin >> x;
    cout << D[x%7] << endl;
}

C++: #include <iostream>
using namespace std;
string day[7]={"thu", "fri", "sat",
     "sun", "mon", "tue", "wed"};
int main() {
  int x;
  cin >> x;
  cout << day[x%7] << endl;
}

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

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

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

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

C++: #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/






int X;
vector<string> month = { "thu", "fri", "sat", "sun", "mon", "tue","wed" };
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> X;
    cout << month[X % 7] << endl;
}

C++: //3
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include<bitset>

using namespace std;
#define loop(i,n) for(int i = 0; i < (n); ++i)
#define loops(i,f,n) for(int i = (f); i < (n); ++i)
#define INF 9999999
#define lint long long int
#define VEC vector<int>
#define VEC2 vector<vector<int>>

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int x;
	cin >> x;
	string ans;
	switch (x % 7)
	{
	case 0:
		ans = "thu";
		break;
	case 1:
		ans = "fri";
		break;
	case 2:
		ans = "sat";
		break;
	case 3:
		ans = "sun";
		break;
	case 4:
		ans = "mon";
		break;
	case 5:
		ans = "tue";
		break;
	case 6:
		ans = "wed";
		break;
	}
	cout << ans << endl;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()
struct revran {
  const i64 b, e;
  struct iter {
    i64 i;
    constexpr iter(const i64 i) noexcept: i(i) {}
    void operator++() noexcept { --i; }
    constexpr i64 operator*() const noexcept { return i; }
    constexpr bool operator!=(const iter x) const noexcept { return i != x.i; }
  };
  constexpr revran(const i64 e) noexcept: b(0), e(e) {}
  constexpr revran(const i64 b, const i64 e) noexcept: b(b), e(e) {}
  constexpr iter begin() const noexcept { return iter(e - 1); }
  constexpr iter end() const noexcept { return iter(b - 1); }
};

struct ran {
  const i64 b, e;
  struct iter {
    i64 i;
    constexpr iter(const i64 i) noexcept: i(i) {}
    void operator++() noexcept { ++i; }
    constexpr i64 operator*() const noexcept { return i; }
    constexpr bool operator!=(const iter x) const noexcept { return i != x.i; }
  };
  constexpr ran(const i64 e) noexcept: b(0), e(e) {}
  constexpr ran(const i64 b, const i64 e) noexcept: b(b), e(e) {}
  constexpr iter begin() const noexcept { return iter(b); }
  constexpr iter end() const noexcept { return iter(e); }
  constexpr revran rev() const noexcept { return revran(b, e); }
};

constexpr ran rin(const i64 e) noexcept { return ran(1, e + 1); }
constexpr ran rin(const i64 b, const i64 e) noexcept { return ran(b, e + 1); }

int main() {
  i64 x;
  cin >> x;
  vector<string> vec(7);
  vec[0] = "sat";
  vec[1] = "sun";
  vec[2] = "mon";
  vec[3] = "tue";
  vec[4] = "wed";
  vec[5] = "thu";
  vec[6] = "fri";
  cout << vec[(((x - 9) % 7) + 7) % 7] << endl;
}