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<iostream>
using namespace std;
int main(){
	int a;
	cin >> a;
	switch (a % 7){
	case 0:
		cout << "tue"<<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 << "thu" << endl;
		break;
	case 6:
		cout << "wed" << endl;
		break;
	}
	return 0;
}

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

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

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

C++: #include <stdio.h>
int main(void){
	int x,sugai;
	scanf("%d",&x);
	sugai=x%7;
	switch(sugai){
		case 2:
			printf("sat\n");
			break;
		case 3:
			printf("sun\n");
			break;
		case 4:
			printf("mon\n");
			break;
		case 5:
			printf("tue\n");
			break;
		case 6:
			printf("wed\n");
			break;
		case 0:
			printf("thu\n");
			break;
		case 1:
			printf("fri\n");
			break;
		default:
			break;
	}
	return 0;
}

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

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

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

int main() {
    int d;
    string days[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
    scanf("%d", &d);
    d = (d-9) % 7;
    if (d < 0) d+= 7;
    printf("%s\n", days[d].c_str());
    return 0;
}

C++: #include <bits/stdc++.h>
#define px(str) cout<<(str)<<endl,exit(0);
#define pe(str) return cout<<(str)<<endl,0;
#define IF(a,b,c) ((a)?(b):(c))
using namespace std;

int main(int argc,char** argv){
	int a;
	cin>>a;
	string s[]={"thu","fri","sat","sun","mon","tue","wed"};
	cout<<s[a%7]<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
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;
  }

  if ( X % 7 == 0 ){

    cout << "thu" <<endl;

  }

  return 0;

}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;

vector<string>sts{

"mon"
,"tue"
, "wed"
, "thu"
, "fri"
, "sat"
, "sun"
};

int main() {	
	int N;cin>>N;
	cout<<sts[(N+3)%7]<<endl;
	return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<vvll> vvvll;
typedef vector<string> vstr;
typedef pair<ll, ll> pll;
typedef vector<pll> vp;
typedef map<ll, ll> mll;
typedef map<string, ll> mstrll;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fir first
#define sec second
#define maxs(x, y) (x = max(x, y))
#define mins(x, y) (x = min(x, y))
#define all(x) begin(x), end(x)
#define rall(x) rbegin(x), rend(x)
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for(ll i = ll(a); i < ll(b); i++)
#define rep(...) _overload3(__VA_ARGS__, repi, _rep,)(__VA_ARGS__)
#define each(i, n) for(auto&& i: n)
#define out(x) cout << (x)
#define indent() cout << '\n'
#define print(x) cout << (x) << '\n'
#define debug(x) cerr << #x << ": " << (x) << '\n'
ll gcd(ll a, ll b){return b != 0 ? gcd(b, a % b) : a;}
ll lcm(ll a, ll b){return a / gcd(a, b) * b;}
const ll INF = 1e16;
const ll MOD = 1e9 + 7;
ll a, b, c, n, m, x, y, z, w, h, ans, cnt, mx, mn;
string s, t;
ll dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
//vll dx = {-1, 0, 1, -1, 1, -1, 0, 1}, dy = {-1, -1, -1, 0, 0, 1, 1, 1};
string alphabet = "abcdefghijklmnopqrstuvwxyz";

signed main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    while(cin >> n){
        if(n % 7 == 1){
            print("fri");
        }else if(n % 7 == 2){
            print("sat");
        }else if(n % 7 == 3){
            print("sun");
        }else if(n % 7 == 4){
            print("mon");
        }else if(n % 7 == 5){
            print("tue");
        }else if(n % 7 == 6){
            print("wed");
        }else{
            print("thu");
        }
    }
}

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

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

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

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

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

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

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

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

  vector<string> v{"thu", "fri", "sat", "sun", "mon", "tue", "wed"};

  cout << v[x % 7] << endl;
}