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 <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
#include <cstring>
#include <deque>
#include <iomanip>
#include <limits>
#include <fstream>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
#define CLR(mat) memset(mat, 0, sizeof(mat))
typedef long long ll;

int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  int X; cin >> X;
  string week[7] = {"mon", "tue", "wed", "thu", "fri", "sat", "sun"};
  int i = 5;
  for(int j = 0; i + j <= 30; j++){
    int k = (i + j) % 7;
    if(j + 9 == X) {
      cout << week[k] << endl;
      return 0;
    }
  }
  FOR(j,1,9){
    int k = (i - j + 7) % 7;
    if(9 - j == X) {
      cout << week[k] << endl;
      return 0;
    }
  }
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <stdio.h>
#include <cstring>
#include <queue>
#include <stack>
#include <functional>
#include <math.h>
#include <iomanip>
using namespace std;
#define Would
#define you
const int INF = 999999999;
const int MOD = 1e9 + 7;

string week[] = { "mon","tue","wed","thu","fri","sat","sun" };
int main() {
	int n;
	cin >> n;
	cout << week[(n + 3) % 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<stdio.h>
#include<iostream>
using namespace std;
int main()
{
	int day;
	cin >> day;
	day = day % 7;
	switch (day)
	{
	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;
	default:
		cout<<"wed"<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <string.h>
#include <cmath>
#include <set>
#include<list>
#include <map>
#define rep(i, n) for(int i = 0; i < n; i++)
#define REP(i, m, n) for(int i = m; i < n; i++)
#define ALL(v) v.begin(),v.end()
#define RALL(v) v.rbegin(),v.rend()
#define check(v) rep(i,v.size()) cout << v[i] << " ";\
cout << endl
#define INF 1e9
typedef long long ll;
using namespace std;

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

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
    int X;
    cin >> X;
    map<int, string> m;
    m[0] = "thu";
    m[1] = "fri";
    m[2] = "sat";
    m[3] = "sun";
    m[4] = "mon";
    m[5] = "tue";
    m[6] = "wed";
    cout << m[X  % 7] << "\n";
    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(void)
{
 int X=0;
 scanf("%d",&X);
 X=X%7;
if(X>=9)
{
 if(X==2)
 {printf("sat\n");}
  if(X==3)
 {printf("sun\n");}
  if(X==4)
 {printf("mon\n");}
  if(X==5)
 {printf("tue\n");}
  if(X==6)
 {printf("wed\n");}
  if(X==0)
 {printf("thu\n");}
  if(X==1)
 {printf("fri\n");}
}
else
{
if(X==2)
 {printf("sat\n");}
if(X==1)
 {printf("fri\n");}
if(X==0)
 {printf("thu\n");}
if(X==6)
 {printf("wed\n");}
if(X==5)
 {printf("tue\n");}
if(X==4)
 {printf("mon\n");}
if(X==3)
 {printf("sun\n");}
}


 return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(void){
	int x=0;
	cin>>x;
	int answer=x%7;
	switch(answer){
		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;
		case 0:
			cout<<"thu"<<endl;
			break;
	}
	return 0;
	
}

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() {
  ll a;
  string result;
  cin >> a;
  a %= 7;
  if (a == 1) result = "fri";
  else if(a == 2) result = "sat";
  else if(a == 3) result = "sun";
  else if(a == 4) result = "mon";
  else if(a == 5) result = "tue";
  else if(a == 6) result = "wed";
  else if(a == 7) result = "thu";
  cout << result << endl;
}

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

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

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

using namespace std;

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

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

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <string>
#include <stack>
#include <cmath>
#define ll long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
using namespace std;
//
const int inf=1e9+7;
const int mod=1e9+7;
//
struct poi{
	int X;int Y;int Z;
	bool operator<(const poi&R)const{
		return X==R.X ? Y==R.Y ? Z<R.Z : Y<R.Y : X<R.X;
	}
};
//
ll GCD(ll a,ll b){
	return (b==0)?(a):(GCD(b,a%b));
}
ll LCM(ll a,ll b){
	return a/GCD(a,b)*b;
}
//
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{
		cout<<"wed"<<endl;
	}
	return 0;
}

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