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 <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;
int main(void) {
  int x,pos;
  cin >> x;
  string weeks[] = { "sat", "sun", "mon", "tue", "wed", "thu", "fri" };
  pos = abs(x-9)%7;
  if (x < 9 && pos > 0) {
    pos = 7 - pos;
  }
  cout << weeks[pos] << endl;

  return 0;
}

C++: # include <iostream>
# include <algorithm>
#include <array>
# include <cassert>
#include <cctype>
#include <climits>
#include <numeric>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <tuple>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <chrono>
# include <random>
# include <limits.h>
# include <unordered_map>
# include <unordered_set>
# include <deque>
# include <cstdio>
# include <cstring>
#include <stdio.h>
#include<time.h>
#include <stdlib.h>
#include <cstdint>
#include <cfenv>

//#include <bits/stdc++.h>
using namespace std;
using LL = int;
using ULL = unsigned long long;
long long MOD = 1000000000 + 7;
constexpr long long INF = numeric_limits<LL>::max();
const double PI = acos(-1);
#define fir first
#define sec second
#define thi third
#define debug(x) cerr<<#x<<": "<<x<<'\n'
typedef pair<LL, LL> Pll;
typedef pair<LL, pair<LL, LL>> Ppll;
typedef pair<LL, pair<LL, bitset<100001>>> Pbll;
typedef pair<LL, pair<LL, vector<LL>>> Pvll;
typedef pair<LL, LL> Vec2;
struct Tll { LL first, second, third; };
struct Fll { LL first, second, third, fourd; };
typedef pair<LL, Tll> Ptll;
#define rep(i,rept) for(LL i=0;i<rept;i++)
#define Mfor(i,mf) for(LL i=mf-1;i>=0;i--)
LL h, w, n, m, k, t, s, q, last, cnt, sum, ans, dp[10000][4], a[2000000], b[2000000];
//string str, ss;
bool f[1100][1100];
char c;
int di[4][2] = { { 0,1 },{ 1,0 },{ 0,-1 },{ -1,0 } };
struct Edge { LL to, cost; };
vector<Edge>vec[200000];
vector<LL>v;
map<Pll, LL>ma;
set<LL>st;
void YN(bool f) {
	if (f)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
}
void yn(bool f) {
	if (f)
		cout << "Yes" << endl;
	else
		cout << "No" << endl;
}
int main() {
	cin >> n;
	string str[7] = {"mon","tue","wed","thu","fri","sat","sun"};
	cout << str[(n+3) % 7] << endl;
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define Cout2(x, y) cout << (x) << " " << (y) << endl
#define dump(x) cout << #x << " = " << (x) << endl;
#define forauto(i, a) for(auto i : a)cout << i << " "; puts("");
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = 1e9;
const double pi = acos(-1.0);

int main() {
	VS str = { "thu","fri","sat","sun","mon","tue","wed" };
	int x; cin >> x;
	Cout(str[x % 7]);
}

C++: #include<cstdio>
#include<functional>
#include<algorithm>
using namespace std;
int main(void)
{
	int x;
	char s[7][4]={"thu","fri","sat","sun","mon","tue","wed"};
	scanf("%d",&x);
	printf("%s\n",s[x%7]);
	return 0;
}

C++: #include<iostream>
using namespace std;
 
int main(){
  int X;
  cin>>X;

switch ((X-2)%7) {
	case(0):
		cout<<"sat"<<endl;
		break;
	case(1):
		cout<<"sun"<<endl;
		break;
	case(2):
		cout<<"mon"<<endl;
		break;
	case(3):
		cout<<"tue"<<endl;
		break;
	case(4):
		cout<<"wed"<<endl;
		break;
	case(5):
		cout<<"thu"<<endl;
		break;
	default:
		cout<<"fri"<<endl;
		break;
}

  return 0;
}

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

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int x;
	cin>>x;
	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;
	if(x%7==1)cout<<"fri"<<endl;
    return 0;
    }

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

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

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

C++: //============================================================================
// Name        : tokuteigai.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
using namespace std;

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

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

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

int main() {
  int x;
  cin >> x;
  int day = x % 7;
  // 2の時金曜
  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 if (day == 6) {
    cout << "wed" << endl;
  }
  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;
}

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

C++: #include<stdio.h>
int main(void)
{
	int x,i;
	char a[8][4]={"fri","sat","sun","mon","tue","wed","thu"};
	scanf("%d",&x);
	printf("%s\n",a[x%7-1]);
}