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)
	}

}

Python: X = int(input())
if X%7==2 :
  print('sat')
elif X%7==3 :
  print('sun')
elif X%7==4 :
  print('mon')
elif X%7==5 :
  print('tue')
elif X%7==6 :
  print('wed')
elif X%7==0 :
  print('thu')
elif X%7==1 :
  print('fri')

C++: #include <iostream>
#include <algorithm>
#include <queue>
#include <vector>
#include <map>
#include <string>

using namespace std;


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

}

C++: #include <iostream>
#include <algorithm>
#include <math.h>
#include <cmath>
#include <stdio.h>
#include <cstring>
#include <string.h>
#include <string>
#include <sstream>
#include <iomanip>

using namespace std;

int main (void)
{
	int n;
	cin >> n;
	
	if (n % 7 == 2)
	{
		cout << "sat" << endl;
	}
	else if (n % 7 == 3)
	{
		cout << "sun" << endl;
	}
	else if (n % 7 == 4)
	{
		cout << "mon" << endl;
	}
	else if (n % 7 == 5)
	{
		cout << "tue" << endl;
	}
	else if (n % 7 == 6)
	{
		cout << "web" << endl;
	}
	else if (n % 7 == 0)
	{
		cout << "thu" << endl;
	}
	else if (n % 7 == 1)
	{
		cout << "fri" << endl;
	}
}

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

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

int main() {
    int x;
    cin >> x;
    string day[7] = {
        "sat",
        "sun",
        "mon",
        "tue",
        "wed",
        "thu",
        "fri"};
    int sa = (x - 9) % 7;
    if(sa < 0)
        cout << day[7 + sa] << endl;
    else
        cout << day[sa] << endl;
}

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

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

    int a=x%7;

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

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

int main(){

	int X;
	cin >> X;

	int Day = X % 7;

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

	return 0;
}

C++: //https://onlinejudge.u-aizu.ac.jp/challenges/sources/PCK/Prelim/0359?year=2017

#include <bits/stdc++.h>

using namespace std;

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

    int y = (x - 9 + 14) % 7;
    string day[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};

    cout << day[y] << endl;
    return 0;
}

/*
 *
 */

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

#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, init, n) for(int i = init; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define fi first
#define se second

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct
{
    int to, cost;
};

const int MOD = 1e9 + 7;
const int iINF = 1e9;
const long long int llINF = 1e18;
const double PI = acos(-1.0);

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

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

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

    int X;
    cin >> X;

    cout << day[X % 7] << endl;
    
    return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<string>
#include<cmath>
#include<math.h>
#include<vector>
#include<algorithm>
#include<map>
#include<unordered_map>
#pragma warning(disable: 4996)
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
using ll = long long;



int main() {

	int x;
	cin >> x;

	int f = x % 7;

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

	return 0;
}

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

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

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

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
  ll a;
  string result;
  cin >> a;
  a %= 7;
  if (a == 1) result = "fri";
  else if(a == 2) result = "sat";
  else if(a == 3) result = "sun";
  else if(a == 4) result = "mon";
  else if(a == 5) result = "tue";
  else if(a == 6) result = "wed";
  else if(a == 0) result = "thu";
  cout << result << endl;
}

C++: #include "bits/stdc++.h"

using namespace std;
int main(void)
{
	vector<string> arr(100);
	for (int i = 0; i < 100; i++)
	{
		if (i%7 == 1)
		{
			arr[i] = "fri";
		}
		if (i % 7 == 2)
		{
			arr[i]="sat";
		}
		if (i % 7 == 3)
		{
			arr[i] =  "sun" ;
		}
		if (i % 7 == 4)
		{
			arr[i] = "mon";
		}
		if (i % 7 == 5)
		{
			arr[i] = "tue";
		}
		if (i % 7 == 6)
		{
			arr[i] = "wed";
		}
		if (i % 7 == 0)
		{
			arr[i] = "thu" ;
		}
	}
	int a; cin >> a;
	cout << arr[a] << "\n";
}

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 X;
	cin>>X;
		X=9-X;
		if(X<0){
			X=X*-1;
		}
		for(int i=0;i<10;i++){
			X=X-7;
			if(X<8){
				break;
			}
		}
		switch(X){
		case 0:cout<<"sat"<<endl;
			break;
		case 1:cout<<"sun"<<endl;
			break;
		case 2:cout<<"mon"<<endl;
			break;
		case 3:cout<<"tue"<<endl;
			break;
		case 4:cout<<"wed"<<endl;
			break;
		case 5:cout<<"thu"<<endl;
			break;
		case 6:cout<<"fri"<<endl;
			break;
		case 7:cout<<"sat"<<endl;
			break;
		}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
int main() {
	int n;
	std::cin >> n;
	std::vector<std::string> v = { "sat","fri","thu","wed","tue","mon","sun" };
	int dis = (std::max(n, 9) - std::min(n, 9)) % 7;
	std::cout << v[dis] << std::endl;
}

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

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