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>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(condition) if(condition){cout << "POSSIBLE" << endl;}else{cout << "IMPOSSIBLE" << endl;}
#define Possible(condition) if(condition){cout << "Possible" << endl;}else{cout << "Impossible" << endl;}
#define possible(condition) if(condition){cout << "possible" << endl;}else{cout << "impossible" << endl;}
#define Size(n) (n).size()

typedef long long ll;


using namespace std;

const int INF = 1e9,MOD = 1e9 + 7;
const ll LINF = 1e18;

/*---------------------------------------------------------------
long long int kaizyo(long long int hh){
    cmp=1;
    while(hh>1){
        cmp=(cmp*hh)%MOD;
        hh--;
    }
    return cmp;
}
long long int ruizyo(long long int aa, long long int bb){
    if(aa==0){
        return 1;
    }
    else if(aa%2==0){
        long long int tt=ruizyo(aa/2,bb);
        return (tt*tt)%MOD;
    }
    else{
        return (ruizyo(aa-1,bb)*bb)%MOD;
    }
}フェルマ－のア
---------------------------------------------------------------

while(x!=0){
            sum+=x%10;
          / x/=10;
        }
        各桁の和
---------------------------------------------------------------

pair<int,int> p[100000];
cin >> tmp;
p[i]=make_pair(tmp,i);
cout << p[i].second+1 << endl;//ペアの右側つまりiを出力
---------------------------------------------------------------

s.find(w[i])==string::npos
findの使い方
---------------------------------------------------------------

for(int i=0;i<n;i++){
    b[i]=x%2;
    x/=2;
  }二進数
---------------------------------------------------------------

bool f[100001];//1000000以下の素数を調べよう！
rrep(i,2,100001){
       f[i]=false;
    }
rrep(i,2,100001){
        if(!f[i]){
            for(int j=i+i;j<=100000;j+=i){
                f[j]=true;
            }
        }
    }
    for(int i=3;i<=100000;i+=2){
        if(!f[i]){
            c[i]++;
        }
    }
---------------------------------------------------------------

visited=vector<vector<bool>>(10,vector<bool>(10,false));アを全部falseに
---------------------------------------------------------------

long long gcd(long long aaa,long long bbb){
    if(bbb==0){
        return aaa;
    }
    return gcd(bbb,aaa%bbb);
}
 
long long lcm(long long aaa,long long bbb){
    long long g = gcd(aaa,bbb);
    return aaa/g * bbb;
}左から最大公約数と最小公倍数


---------------------------------------------------------------

long long int prime_cnt[10000];
       for(int i=2;i*i<=n;i++){
           while(n%i==0){
               n/=i;
               prime_cnt[i]+=1;
           }
           if(n>1){
               prime_cnt[n]+=1;
               break;
           }
      }ある数nを素因数分解しましょう

---------------------------------------------------------------
debug:
cout<<"i: "<<i<<" j: "<<j<<" cnt: "<<cnt<<"\n";

---------------------------------------------------------------*/

long long int n,cnt=0,ans=0,a,b,c,d,cmp,cmpp,m,h,w,x,y,sum=0,pos;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl=true;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

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

       cin>>x;
       if(x%7==3)Cout("sun");
       else if(x%7==4)Cout("mon");
       else if(x%7==5)Cout("tue");
       else if(x%7==6)Cout("wed");
       else if(x%7==0)Cout("thu");
       else if(x%7==1)Cout("fri");
       else if(x%7==2)Cout("sat");
       
return 0;
}

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

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

int main() {
	int X; cin >> X;
	cout << S[(X + 26) % 7] << endl;
	return 0;
}

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

C++: #include <iostream>
using namespace std;
typedef long long i64;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()

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

int main(){
  int x;
  cin >> x;
  cout << s[(x - 2 + 7) % 7] << endl;
}

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

using namespace std;

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

	return 0;
}

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

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

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

using namespace std;

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

int main()
{
  int X;
  cin >> X;
  cout << s[(X + 3) % 7] << endl;
}

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

C++: #include<set>
#include<iostream>
#include<ctime>
#include<string>
#include<cstdlib>
#include<algorithm>
#include<random>
#include<map>
#include<unordered_map>
#include<unordered_set>
#include<vector>
#include<list>
#include<queue>
#include<stack>
#include<functional>
#include<string.h>
#include<limits.h>
using namespace std;

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

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

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
typedef long long int ll;

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

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n; cin >> n;
	cout << s[n%7] << endl;
}

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