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>
using namespace std;
int main(void){
    int x;
    cin >> x;
    if(x <= 9){
        int y;
        y = (9-x) % 7;
        if(y == 0){
            cout << "sat" << endl; 
        }else if(y == 1){
            cout << "fri" << endl;
        }else if(y == 2){
            cout << "thu" << endl;
        }else if(y == 3){
            cout << "wed" << endl;
        }else if(y == 4){
            cout << "tue" << endl;
        }else if(y == 5){
            cout << "mon" << endl;
        }else{
            cout << "sun" << endl;
        }
        
        
    }else{
        int y;
        y = (x-9) % 7;
        if(y == 0){
            cout << "sat" << endl; 
        }else if(y == 1){
            cout << "sun" << endl;
        }else if(y == 2){
            cout << "mon" << endl;
        }else if(y == 3){
            cout << "tue" << endl;
        }else if(y == 4){
            cout << "wed" << endl;
        }else if(y == 5){
            cout << "thu" << endl;
        }else{
            cout << "fri" << endl;
        }
        
    }
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <utility>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <cmath>

#define rep(i,j,k) for(int i=(int)j;i<(int)k;i++)
#define itrep(i,x) for(auto i=(x).begin(); i!=(x).end();i++)
#define Sort(x) sort((x).begin(),(x).end())
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define vec vector
#define INF (int)1e9
#define INFL 1e18
#define MOD 1000000007
#define pb push_back
#define MP make_pair
#define PI 3.1415926535
typedef long long int ll;
typedef std::pair<int,int> P;
int D=1;
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};

using namespace std;

int main(){
    string s[]={"mon","tue","wed","thu","fri","sat","sun"};
    int index=3;
    int x; cin>>x;
    rep(i,0,x){
        index++;
        if(index==7)index=0;
    }
    cout<<s[index]<<endl;

    return 0;
}

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

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

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

typedef long long ll;
using namespace std;

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

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

	int x; cin >> x;
	cout << w[x%7] << endl;	

	return 0;

}

C++: #include<stdio.h>
int main()
{
	int x;
	scanf("%d",&x);
	if(x==4||x==11||x==18||x==25){
		printf("mon\n");
	}
	else if(x==5||x==12||x==19||x==26){
		printf("tue\n");
	}
	else if(x==6||x==13||x==20||x==27){
		printf("wed\n");
	}
	else if(x==7||x==14||x==21||x==28){
		printf("thu\n");
	}
	else if(x==1||x==8||x==15||x==22||x==29){
		printf("fri\n");
	}
	else if(x==2||x==9||x==16||x==23||x==30){
		printf("sat\n");
	}
	else printf("sun\n");
	return 0;
}

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 <cstdio>
#include <cctype>
#include <utility>
#include <string>
using namespace std;

#define _gp(l) const auto gcu{getchar##l}; const auto pcu{putchar##l}
#ifdef __linux
_gp(_unlocked);
#else
_gp();
#endif
#define _DEF(r, n, ...) inline r n(__VA_ARGS__) noexcept
#define _T template<typename T>
#define _HT template<typename H,typename... T>
_T _DEF(T,in,int c){T n{};int m{1};while(isspace(c)){c=gcu();}if(c=='-')m=-1,c=gcu();do{n=10*n+(c-'0'),c=gcu();}while(c>='0'&&c<='9');return m*n;}
_DEF(int,in,){return in<int>(gcu());}
#define _SCAN(...) _DEF(bool,scan,__VA_ARGS__)
_SCAN(char &c){c=gcu();gcu();return c!=EOF;}
_T _SCAN(T &n){int c{gcu()};return c==EOF?false:(n=in<T>(c),true);}
#define _OUT(...) _DEF(void,out,__VA_ARGS__)
#define _OUTL(...) _DEF(void,outl,__VA_ARGS__)
_OUT(bool b){pcu('0'+b);}
_OUT(char c){pcu(c);}
#ifdef _GLIBCXX_STRING
_SCAN(string &s){int c;s="";for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=(char)c;}}
_OUT(string s){for(char c:s)pcu(c);}
#endif
_OUT(const char *s){while(*s)pcu(*s++);}
_T _OUT(T n){static char b[20];char *p{b};T m=n<0?pcu('-'),-1:1;if(!n)*p++='0';else while(n)*p++=(char)(n%10*m+'0'),n/=10;while(p!=b)pcu(*--p);}
_OUTL(){out('\n');}
#ifdef _GLIBCXX_VECTOR
_T _OUT(vector<T> v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);}
#endif
_HT _SCAN(H &h,T&&... t){return scan(h)&&scan(t...);}
_HT _OUT(H&& h, T&&... t){out(h);out(move(t)...);}
template <typename... T> _OUTL(T&&... t){out(move(t)...);outl();}
struct range{int e,b{0},s{1};range(int _b,int _e,int _s):e(_e),b(_b),s(_s){}range(int _b,int _e):e(_e),b(_b){}range(int _e):e(_e){}
	struct it{int v,s;it(int _v,int _s):v(_v),s(_s){}operator int()const{return v;}operator int&(){return v;}int operator*()const{return v;}it& operator++(){v+=s;return *this;}};
	it begin(){return{b, s};}it end(){return{e,s};}};

int main() {
	const string s {"thufrisatsunmontuewed"};
	outl(s.substr(in() % 7 * 3, 3));
}

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



int main(){

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

C++: #include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cout;
using std::endl;
using std::cin;

template<typename T>
std::vector<T> make_v(size_t a){return std::vector<T>(a);}

template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts){
  return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}

int main() {
	int n; scanf("%d", &n);
	
	std::vector<std::string> v = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
	printf("%s\n", v[(n - 2 + (int)v.size()) % v.size()].c_str());
	return 0;
}

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

C++: #include<iostream>;

using namespace std;

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

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