Go: package main

import "fmt"

func main() {
	week := []string{"fri", "sat", "sun", "mon", "tue", "wed", "thu"}

	var day int
	fmt.Scan(&day)
	dayOfWeek := -1
	for i := 0; i < day; i++ {
		if dayOfWeek == 6 {
			dayOfWeek = -1
		}
		dayOfWeek++
	}
	fmt.Println(week[dayOfWeek])
}

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

C++: /*--------------------------------------------------------------------------\
|1週間　= 7日																|
|曜日は7つ　=> x1,x2,x3,x4,x5,x6,x7とする									|
|日にちをxとすると、															|
|x % 7によって得られる値で曜日を定められる。									|
|9月9日は土曜日																|
|		↓																	|
|9 mod 7 = 2だから、x % 7 == 2になるような日にちxの曜日は土曜日				|
|			↓																|
|  |x % 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 |										|
|  |day   |thu|fri|sat|sun|mon|tue|wed|										|
|			↓																|
|上の表を参考に余りの値を対応させていく。										|
|if文を使ってもいいけど、今回はswitch文を使った方がスマート。					|
\--------------------------------------------------------------------------*/

#include <iostream>
using namespace std;

int main() {
	int x; cin >> x;
	//switch文を使った出力処理
	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;
	case 6:
		cout << "wed" << endl;
		break;
	}
	return 0;
}

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

using namespace std;

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

int main() {
	int x;

	cin >> x;
	cout << Days[x % 7] << endl;
	
	return 0;
}

C++: #include <iostream>
using namespace std;char w[]="thufrisatsunmontuewed";int main(){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() {
  cin.tie(0);
  ios::sync_with_stdio(false);

  int x;
  cin >> x;

  string s;
  switch(x % 7) {
    case 0: s = "thu"; break;
    case 1: s = "fri"; break;
    case 2: s = "sat"; break;
    case 3: s = "sun"; break;
    case 4: s = "mon"; break;
    case 5: s = "tue"; break;
    case 6: s = "wed"; break;
  }
  cout << s << endl;
}

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

  return 0;
}

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

#define FOR( i, m, n )   for( int i = m; i < n; i++ )
#define REP( i, n )      FOR( i, 0, n )
#define ALL( a )         (a).begin(), (a).end()

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

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

C++: #include<cstdio>

int main() {
	int a;
	scanf("%d", &a);
	switch (a%7) {
		case 0 :
			printf("thu");
			break;
		case 1 :
			printf("fri");
			break;
		case 2 :
			printf("sat");
			break;
		case 3 :
			printf("sun");
			break;
		case 4 :
			printf("mon");
			break;
		case 5 :
			printf("tue");
			break;
		case 6 :
			printf("web");
	}
	printf("\n");
	return 0;
}

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

int main()
{
    int a,b,c;
    cin >> a;
    string day[7]={"thu","fri","sat","sun","mon","tue","wed"};
    cout << day[a%7] << endl;
    return 0;
}

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;

int main(){

	int table[31];

	int youbi = 5;
	for(int day = 1; day <= 30; day++){
		table[day] = youbi;
		youbi++;
		if(youbi == 8)youbi = 1;
	}

	int X;
	scanf("%d",&X);

	switch(table[X]){
	case 1:
		printf("mon\n");
		break;
	case 2:
		printf("tue\n");
		break;
	case 3:
		printf("wed\n");
		break;
	case 4:
		printf("thu\n");
		break;
	case 5:
		printf("fri\n");
		break;
	case 6:
		printf("sat\n");
		break;
	case 7:
		printf("sun\n");
		break;
	}

	return 0;
}