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>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    string s[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
    cout << s[(n % 7 + 5) % 7] << endl;
    return 0;
}

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

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

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

  return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) FOR(i,0,n)
#define repr(i,n) for(int i=(n)-1;0<=i;--i)
#define each(e,v) for(auto&& e:(v))
#define all(v) begin(v),end(v)
#define dump(x) cerr<<#x<<": "<<(x)<<endl
#define INF 100000000
#define IINF 9999999999999;
using vint = vector<int>;
using ll = long long;
using vll = vector<ll>;
template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

// 1

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

    int X;
    cin >> X;
    int a = X % 7;
    switch(a) {
        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;
    }
}

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

using namespace std;

#define int long long
#define INF 1e9
#define LINF 1e18

typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<int, P> Pi;

typedef pair<P, P> PP;

const int MOD = 1e9 + 7;
const int dy[] = { 0, 0, 1, -1 };
const int dx[] = { 1, -1, 0, 0 };

template <class T> void chmin(T& a, const T& b) { a = min(a, b); }
template <class T> void chmax(T& a, const T& b) { a = max(a, b); }

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

signed main() {
	cin.tie(0);
    ios::sync_with_stdio(false);
    
    int x;
    cin >> x;
    cout << s[x % 7] << "\n";
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
#include<math.h>
int main()
{
	int x;
	cin>>x;
	if(x==4||x==11||x==18||x==25)
		cout<<"mon"<<endl;
	if(x==5||x==12||x==19||x==26)
		cout<<"tue"<<endl;
	if(x==6||x==13||x==20||x==27)
		cout<<"wed"<<endl;
	if(x==7||x==14||x==21||x==28)
		cout<<"thu"<<endl;
	if(x==1||x==8||x==15||x==22||x==29)
		cout<<"fri"<<endl;
	if(x==2||x==9||x==16||x==23||x==30)
		cout<<"sat"<<endl;
	if(x==3||x==10||x==17||x==24)
		cout<<"sun"<<endl;
	return 0;
}

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

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

	switch(day%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 <bits/stdc++.h>
using namespace std;

#define int long long
#define pb push_back 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i, n) for( int i = 0; i < (n); i++ )
#define Rrep(i, a, n) for( int i = (a); i < (n); i++ )
#define All(v) v.begin(), v.end()

typedef pair<int, int> Pii; 
typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

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

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

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

C++: #include <iostream>
#include <fstream>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <set>
#include <stack>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <random>
#include <cassert>
using namespace std;
#define LL long long
#undef INT_MIN
#undef INT_MAX
#define INT_MIN -2147483648
#define INT_MAX 2147483647
#define LL_MIN -9223372036854775808
#define LL_MAX 9223372036854775807
#define segment_size 65536
#define ROOP() while(true)
int main(){
    int X;
    cin >> X;
    switch(X%7){
        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;
        case 1:
        cout << "fri" << endl;
        break;
    }
}

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;
}