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() {
	int X;
	cin >> X;
	X = (X + 70 - 9) % 7;
	if (X == 0) {
		cout << "sat" << endl;
	}
	else if (X == 1) {
		cout << "sun" << endl;
	}
	else if (X == 2) {
		cout << "mon" << endl;
	}
	else if (X == 3) {
		cout << "tue" << endl;
	}
	else if (X == 4) {
		cout << "wed" << endl;
	}
	else if (X == 5) {
		cout << "thu" << endl;
	}
	else{
		cout << "fri" << endl;
	}
	return 0;
}

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;

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

C++: #include <stdio.h>
#include <algorithm>
#include <iostream>
#include <numeric>
using namespace std;

int a;

int main(void)
{
	cin>>a;
	int b = a%7;
	switch(b){
	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;
			break;
	}
	cout<<endl;


	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

using i64 = int64_t;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;


signed main(){

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

    int x;
    cin >> x;
    cout << s[(x + 3) % 7] << endl;

}

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

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

#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i,a,b) for (int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define ALL(v) (v).begin(),(v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x,n) bitset<n>(x)
#define PI 3.14159265358979323846

typedef long long ll;
typedef pair<ll,int> P;
typedef pair<ll,P> PP;

//-----------------------------------------------------------------------------


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

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

	return 0;
}

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

int main(){
    int x;
    cin >> x;
    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;
    }
    if(x % 7 == 0){
        cout << "thu" << endl;
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int x;
    cin>>x;
    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;
    if(x%7==7)
    cout<<"thu"<<endl;
    return 0;
}

C++: #include<iostream>
#include<stdio.h>

using namespace std;

int main(void) {
	char week[7][4] = { "sat","sun","mon","tue","wed","thu","fri"};
	int x;
	cin >> x;
	int sa = (x - 9) % 7;
	if (sa >= 0)printf("%s\n", &week[sa]);
	else printf("%s\n", &week[7 + sa]);
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;

string dw[7] = { "thu", "fri", "sat", "sun", "mon", "tue", "wed" }; // 木金土日月火水

int main() {
    int x;
    cin >> x;
    cout << dw[x % 7] << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1LL<<30;

int main() {
    int x;
    cin >> x;
    x = (x+5)%7;

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

    return 0;
}

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

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

C++: #include <stdio.h>
#include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

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