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 X;
  cin >> X;
  switch (X % 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;
    default:
      cout << "wed" << endl;
  }
  return 0;
}

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

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

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

int main() {
  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;

  return 0;
}

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

C++: #include <iostream>
using namespace std;char w[]="thufrisatsunmontuewed";int main(){int i;cin >> i;cout << w[(i%7)*3] << w[(i%7)*3+1] << w[(i%7)*3+2] << endl;}

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

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){
      cout 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<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin >> N;
    string ans;
    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;
    }
    cout << ans << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
int x;
cin>>x;
int Day = x%7;
if(Day == 0){
             cout<<"thu"<<endl;
            }
else 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 {
             cout<<"wed"<<endl;            
}
}

C++: #include<bits/stdc++.h>
#define all(vec) vec.begin(),vec.end()
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll MOD=10000000;
const ll INF=1000000001;
const ll LINF=4000000000000000010;
const double EPS=1e-9;
int dx[5]={0,1,0,-1,0};
int dy[5]={1,0,-1,0,0};
int main(){
    int x;cin>>x;
    int d[31];
    d[9]=5;
    for(int i=8;i>=1;i--){
        d[i]=(d[i+1]-1+7)%7;
    }
    for(int i=10;i<=30;i++){
        d[i]=(d[i-1]+1)%7;
    }
    if(d[x]==0){
        cout<<"mon"<<endl;
    }else if(d[x]==1){
        cout<<"tue"<<endl;
    }else if(d[x]==2){
        cout<<"wed"<<endl;
    }else if(d[x]==3){
        cout<<"thu"<<endl;
    }else if(d[x]==4){
        cout<<"fri"<<endl;
    }else if(d[x]==5){
        cout<<"sat"<<endl;
    }else{
        cout<<"sun"<<endl;
    }
}

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

C++: #include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef long long int ll;

#define ALL(v) (v).begin(), (v).end()
#define RALL(v) (v).rbegin(), (v).rend()
#define endl "\n"
const double EPS = 1e-7;
const int INF = 1 << 30;
const ll LLINF = 1LL << 60;
const double PI = acos(-1);
const int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

//-------------------------------------

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x;
    cin >> x;
    string youbi[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
    if (x < 9)
    {
        int tmp = 7 - abs(x - 9) % 7;
        if (tmp == 7)
        {
            cout << youbi[0] << endl;
        }
        else
        {
            cout << youbi[tmp] << endl;
        }
    }
    else
    {
        cout << youbi[abs(x - 9) % 7] << endl;
    }
}

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

C++: #include<iostream>
using namespace std;
int main(){
	int a;
	cin >> a;
	switch (a % 7){
	case 0:
		cout << "thu"<<endl;
		break;
	case 1:
		cout << "fri" << endl;
		break;
	case 2:
		cout << "sat" << endl;
		break;
	case 3:
		cout << "san" << 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(){
    long int N,M;
    cin >> N;

    if((N+3)%7==0){
        cout<<"mon"<<endl;
    }
    if((N+2)%7==0){
        cout<<"tue"<<endl;
    }
    if((N+1)%7==0){
        cout<<"wed"<<endl;
    }
    if(N%7==0){
        cout<<"thu"<<endl;
    }
    if((N-1)%7==0){
        cout<<"fri"<<endl;
    }
    if((N-2)%7==0){
        cout<<"sat"<<endl;
    }
    if((N-3)%7==0){
        cout<<"sun"<<endl;
    }
    return 0;
}