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;

int main(){
	
	int n;
	cin >> n;
	
	n %= 7;
	
	switch(n){
	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(){
    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(void){
    int x,a;
    cin >> x;
    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
        cout <<"thu" << endl;


}

C++: #include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 10000000000000009
//#define INF 9223372036854775807
typedef long long ll;
#define REP(i,n) for(int i=0;i<(n);++i)
#define OREP(i,n) for(int i=1;i<=(n);++i)
#define ORREP(i,n) for(int i=(n);i>=1;--i)
#define ZREP(i,n) for(int i=1;i<(n);++i)
#define RREP(i,n) for(int i=(n)-1;i>=0;--i)
#define rollcall cout<<"I'm Sucu."<<endl;
#define YES(s) s?cout << "YES" << endl:cout << "NO" << endl
#define Yes(s) s?cout << "Yes" << endl:cout << "No" << endl
#define Taka(s) s?cout << "Takahashi" << endl:cout << "Aoki" << endl
#define out(s,t,u) s?cout << t << endl:cout << u << endl
#define int ll
#define Endl endl

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

C++: #include<stdio.h>
int main(void)
{
	int x;

	scanf("%d",&x);

	if(x==1||x==8||x==15||x==22||x==29){
		printf("fri\n");
	}else if(x==7||x==14||x==21||x==28){
		printf("thu\n");
	}else if(x==6||x==13||x==20||x==27){
		printf("wed\n");
	}else if(x==5||x==12||x==19||x==26){
		printf("tue\n");
	}else if(x==4||x==11||x==18||x==25){
		printf("mon\n");
	}else if(x==3||x==10||x==17||x==24){
		printf("sun\n");
	}
	else if(x==2||x==9||x==16||x==23||x==30){
		printf("sat\n");
	}
	return 0;
}

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

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

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

using namespace std;

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

	int day_no = (n - 4 + 7) % 7;

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

C++: #include<algorithm>
#include<iostream>
#include<vector>
#include<string>
#include<map>
#include<stack>
#include<queue>
#include<iomanip>
#include<set>
#include<bitset>
#include <cstdio>
#include <cmath>

using namespace std;

typedef long long ll;
#define put(n) cout<<(n)<<"\n"
#define FOR(i,num,N) for(int(i)=(num);(i)<(N);++(i))
#define RFOR(i,num,N) for(int (i)=(num);(i)>(N);--(i))
#define all(v) (v).begin() , (v).end()
#define rall(v) (v).rbegin() , (v).rend()

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

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

using namespace std;

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

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

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>

using namespace std;

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

C++: #include <bits/stdc++.h>
#define fo(i,a) for(i = 0;i < a;i++)
using namespace std;
//int kansu(int a,int b) ;
int main(void)
{
	int n,i;
	
	cin >> n ;
	i = (n + 4) % 7 ;
	switch(i){
	case 1:
		cout << "mon" << endl ;
		break ;
	case 2:
		cout << "tue" << endl ;
		break ;
	case 3:
		cout << "wed" << endl ;
		break ;
	case 4:
		cout << "thu" << endl ;
		break ;
	case 5:
		cout << "fri" << endl ;
		break ;
	case 6:
		cout << "sat" << endl ;
		break ;
	default:
		cout << "sun" << endl ;
		break ;
	}
	
	return 0 ;
}

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

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

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

  int a[31] = {0};
  for(int i = 1; i <= 31; i+=7){
    a[i] = 6;
  }
  for(int i = 2; i <= 31; i+=7){
    a[i] = 7;
  }
  for(int i = 3; i <= 31; i+=7){
    a[i] = 1;
  }

  for(int i = 4; i <= 31; i+=7){
    a[i] = 2;
  }
  for(int i = 5; i <= 31; i+=7){
    a[i] = 3;
  }
  for(int i = 6; i <= 31; i+=7){
    a[i] = 4;
  }
  for(int i = 7; i <= 31; i+=7){
    a[i] = 5;
  }

  if(a[X] == 6){cout << "fri" << endl;}
  if(a[X] == 7){cout << "sat" << endl;}
  if(a[X] == 1)cout << "sun" << endl;
  if(a[X] == 2)cout << "mon" << endl;
  if(a[X] == 3)cout << "tue" << endl;
  if(a[X] == 4)cout << "wed" << endl;
  if(a[X] == 5)cout << "thu" << endl;

  return 0;
}