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<set>
using namespace std;
#include<iostream>
int	main(){
	/*
	while(true){
	
	int A,B,C,D,E,F,G,H,I,J,answer;
		
	cin >> A;
	if(A == 0) return 0;
	cin >> B >> C >> D >> E >> F >> G >> H >> I >> J;
	answer = A - B - C - D-E-F-G-H-I-J;
	cout << answer << endl;

	}
	*/
	/*
	int A,B,C,D,E,F;

	cin >> A, B, C, D;
	if(A < B, C, D){ 
		cout << B + C + D << endl;
	}
	
	else if(B < A, C, D){
		cout << A + C + D << endl;
	}

	else if(C < A && C < B && C < D){
		cout << A + B + D << endl;
	}

	else if(D < A && D < B && D < C){
		cout << A + B + C << endl;
	}

	if(E < F){
		cout << F << endl;
	}

	else{
		cout << E << endl;
	}
	
	return 0;
}*/
	/*
	int N, M;
	cin >> N >> M;
	cout << N + M << endl << N - M << endl << N * M << endl << N / M << endl;
}*/

/*int N, M; 
	cin >> N >> M;
	cout << N % M << endl;
}*/

/*	int N;
	cin >> N;
	cout << -(N % 2)+1 ;
}*/

	/*int A, B, C, D, E ;
	cin >> A >> B >> C >> D >> E;
	cout << (A + B + C + D + E) / 5 ;
}*/

	/*int A, B, C, D ;
	cin >> A >> B >> C >> D;
	cout << (A + B + C + D) / 60 << endl << (A + B + C + D) % 60 << endl;
	*/

/*	int A,B;
	cin >> A >> B;
	cout << ( A + B ) / 2 << endl;*/

/*	int m, f, b;
	cin >> m >> f >> b;

	if ( m + f >= b && m <= b ){
		cout << b - m << endl;
	}
	
	if ( m + f > b && m > b ){
		cout << 0 << endl;
	}


	if ( m + f < b ){
		cout << "NA" << endl;
	}*/

	int X , x ;
	cin >> X ;

	x = X % 7 ;

	if ( x == 2 ){
		cout << "sat" << endl;
	}

	if ( x == 3 ){
		cout << "sun" << endl;
	}

	if ( x == 4 ){
		cout << "mon" << endl;
	}

	if ( x == 5 ){
		cout << "tue" << endl;
	}

	if ( x == 6 ){
		cout << "wed" << endl;
	}

	if ( x == 0 ){
		cout << "thu" << endl;
	}

	if ( x == 1 ){
		cout << "fri" << endl;
	}
}

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

C++: #include<iostream>
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<iostream>
using namespace std;

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

    if((X-1)%7==0){
        cout << "fri" << endl;
    }

    else if((X-2)%7==0){
        cout << "sat" << endl;
    }

    else if((X-3)%7==0){
        cout << "sun" << endl;
    }

    else if((X-4)%7==0){
        cout << "mon" << endl;
    }

    else if((X-5)%7==0){
        cout << "tue" << endl;
    }

    else if((X-6)%7==0){
        cout << "wed" << endl;
    }

    else if((X-7)%7==0){
        cout << "thu" << endl;
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
  int X;
  cin>>X;

switch ((X-2)%7) {
	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;
	default:
		cout<<"fri"<<endl;
		break;
}

  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 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 <bits/stdc++.h>

using namespace std;

int main(){
  int x; cin>>x;
  switch(x%7){
  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;
  }
  cout <<endl;
  
  return 0;
}

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

C++: #include <iostream>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>
#include <cmath>

static const int MOD = 1000000007;
using ll = long long;
using u32 = unsigned;
using u64 = unsigned long long;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

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

C++: #include <iostream>
using namespace std;
int main(void){
    int X;
    cin >> X;
    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;
    }
    else if( X % 7 == 1){
        cout << "fri" << endl;
    }
    else if( X % 7 == 2){
        cout << "sat" << endl;
    }
    else{
        cout << "sun" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<P,int> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

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

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

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

#define int long long

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

	return 0;
}

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

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

    cout << endl;

    return 0;
}