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>
using namespace std;

int main()
{
char week[8][20]={{"thu"},{"fri"},{"sat"},{"sun"},{"mon"},{"tue"},{"wed"}}

int day;

cin >> day;

cout << week[day%7] << enld;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}
int main(){
  int n;
  cin>>n;
  n%=7;
  string a;
  if(n==1) a="fri";
  if(n==2) a="sat";
  if(n==3) a="sun";
  if(n==4) a="mon";
  if(n==5) a="tue";
  if(n==6) a="wed";
  if(n==0) a="thu";
  cout<<a<<endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	string day[] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
	int d;
	cin >> d;
	cout << day[d % 7] << endl;
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<cmath>
#define _GLIBCXX_DEBUG
using namespace std;

int main(void)
{
  int X;
  cin>>X;
  vector<string> data(X+1);
  for(int i=1;i<=X;i++){
    if(i%7==1) data[i]="fri";
    else if(i%7==2) data[i]="sat";
    else if(i%7==3) data[i]="sun";
    else if(i%7==4) data[i]="mon";
    else if(i%7==5) data[i]="tue";
    else if(i%7==6) data[i]="wed";
    else if(i%7==0) data[i]="thu";
  }
  cout<<data[X]<<endl;
  return 0;
}

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

C++: #include <stdio.h>
 
const char* dates[7] = { "sat", "sun", "mon", "tue", "wed", "thu", "fri" };
 
int main(void) {
  int date;
  scanf("%d", &date);
  printf("%s\n", dates[(((date - 9) % 7) + 7) % 7]);
  return 0;
}

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

int main()
{
	int x;
	cin >>x;
	if ( x = 1,8,15,22,29)cout <<"fti";
	if ( x = 2,9,16,23,30)cout << "sat";
	if ( x = 3,10,17,24)cout <<"sun";
	if ( x = 4,11,18,25)cout <<"mon";
	if (x=5,12,19,26)cout <<"tue";
	if (x = 6,13,20,27)cout<<"wed";
	if ( x = 7,14,21,28)cout << "thu";
	cout <<endl;
	return 0 ;
}

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

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

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

#define ASC(vec) vec.begin(), vec.end()    // 昇順ソート 例：sort(ASC(vec));
#define DESC(vec) vec.rbegin(), vec.rend() // 降順ソート 例：sort(DESC(vec));
#define rep(i, n) for (int i = 0; i < (n); i++)
#define Rep(i, n) for (int i = 1; i < n; i++)
#define REP(i, vec) for (auto i = vec.begin(); i != vec.end(); ++i)

const int       mod = 1000000007;
const int       inf = (1 << 21);
const long long INF = 1LL << 60;

using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vb = vector<bool>;
using vl = vector<ll>;
using vs = vector<string>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
using vvb = vector<vector<bool>>;
using vii = vector<pair<int, int>>;
using vll = vector<pair<ll, ll>>;

template<class T>
inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T>
inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T>
T GCD(T a, T b) { if (b == 0) return a; else return GCD(b, a % b); }
template<class T>
T LCM(T a, T b) { return a / GCD(a, b) * b; }

constexpr array<int, 9> dx = { 0, 1, 0, -1, -1, 1, 1, -1, 0 };
constexpr array<int, 9> dy = { 1, 0, -1, 0, 1, 1, -1, -1, 0 };

// ──────────────────────────────────────────────────────────────────

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

	vs s = { "thu", "fri", "sat", "sun", "mon", "tue", "wed" };

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	int x,a;
	cin >> x;
	a =(x-9)%7;

	if(a == 0)cout << "sat" << endl;
	if(a == 1)cout << "sun" << endl;
	if(a == 2)cout << "mon" << endl;
	if(a == 3)cout << "tue" << endl;
	if(a == 4)cout << "wed" << endl;
	if(a == 5)cout << "thu" << endl;
	if(a == 6)cout << "fri" << endl;

	return 0;
}

C++: // 2017/09/21 Tazoe

#include <iostream>
using namespace std;

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

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

	return 0;
}

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

int main()
{
	char week[8][20] = { { "thu" },{ "fri" },{ "sat" },{ "sun" },{ "mon" },{ "tue" },{ "wed" } };

	int day;

	cin >> day;

	cout << week[day % 7] << endl;
}

C++: #include <iostream>

int main()
{
    int X;
    std::cin >> X;
    constexpr int N = 7;
    const std::string d[N] = {
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
    };

    int p = 5;
    if (X <= 9) {
        for (int i = 9; i > X; i--) {
            p = (p - 1 + N) % N;
        }
    } else {
        for (int i = 9; i < X; i++) {
            p = (p + 1) % N;
        }
    }

    std::cout << d[p] << std::endl;
    return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define pp pair<int,int>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define ll long long
#define ld long double
#define all(a) (a).begin(),(a).end()
#define mk make_pair
ll MOD=1000000007;
ll mod=998244353;
int inf=1000001000;
ll INF=1e18+5;


int main() {
  vector<string> s={"sat","sun","mon","tue","wed","thu","fri"};
  int x;
  cin >> x;
  cout << s[(x-9+14)%7] << endl;
}

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

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

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

    string dow[7] = {"sat","sun","mon","tue","wed","thu","fri"};

    int s = abs(x-9);
    s = s%7;

    if(x>=9){
        cout << dow[s] << endl;
    }else{
        if(s==0){
            cout << dow[0] << endl;
        }else{
            cout << dow[7-s] << endl;
        }
    }
}