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::literals::string_literals;
using i64 = long long;
using std::cout;
using std::endl;
using std::cin;

template<typename T>
std::vector<T> make_v(size_t a){return std::vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

int main() {
	int n; scanf("%d", &n);
	
	std::vector<std::string> v = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
	printf("%s\n", v[(n - 2 + (int)v.size()) % v.size()].c_str());
	return 0;
}

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;
    if(x%7==0)
    cout<<"thu"<<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;
else cout<<"thu"<<endl;
return 0;
}

C++: #include<iostream>;

using namespace std;

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

C++: #include<cstdio>
int main()
{
	int a;
	scanf("%d",&a);
	if(a>7){
		while(1){
			a%=7;
			if(a<=7) break;
		}
	}
	if(a==1) printf("fri\n");
	else if(a==2) printf("sat\n");
	else if(a==3) printf("sun\n");
	else if(a==4) printf("mon\n");
	else if(a==5) printf("tue\n");
	else if(a==6) printf("wed\n");
	else printf("thu\n");
	return 0;
}

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

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

  int sa=X-9;
  if(sa>=0){
    switch(sa%7){
      case 0:cout<<"sat";break;
      case 1:cout<<"sun";break;
      case 2:cout<<"mon";break;
      case 3:cout<<"tue";break;
      case 4:cout<<"wed";break;
      case 5:cout<<"thu";break;
      case 6:cout<<"fri";break;
    }
  }
  else{
    sa*=-1;
    switch(sa%7){
      case 0:cout<<"sat";break;
      case 1:cout<<"fri";break;
      case 2:cout<<"thu";break;
      case 3:cout<<"wed";break;
      case 4:cout<<"tue";break;
      case 5:cout<<"mon";break;
      case 6:cout<<"sun";break;
    }
  }
  cout<<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;}

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() {
	string day[7] = {
    "fri",
    "sat",
    "sun",
    "mon",
    "tue",
    "wed",
    "thu"
  };
  ll a;
  cin >> a;
  a %= 7;
  cout << day[a - 1] << endl;
}

C++: #include <stdio.h>
int main(){
    int n,ans[300];
    scanf("%d",&n);
    for(int i=1;i<=30;i++)ans[i]=i%7;
    if(ans[n]==2)printf("sat\n");
    else if(ans[n]==3)printf("sun\n");
    else if(ans[n]==4)printf("mon\n");
    else if(ans[n]==5)printf("tue\n");
    else if(ans[n]==6)printf("wed\n");
    else if(ans[n]==0)printf("thu\n");
    else if(ans[n]==1)printf("fri\n");
}

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

int main()
{
	int x;
	cin >>x;
	if ( x = 1,8,15,22,29)cout <<"fri";
	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++: int main() {
	int X;
	cin>>X;
		X=9-X;
		if(X<0){
			X=X*-1;
		}
		for(int i=0;X<8;i++){
			X=X-7;
		}
		switch(X){
		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<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<climits>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<iomanip>
using namespace std;

#define rep(i,j,n) for(int i=(j);i<(n);i++)
#define rep2(i,j,n) for(int i=(j);i<=(n);i++)
#define all(i) i.begin(),i.end()

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef pair<int, int> pi;
typedef long long i64;

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

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

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

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

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