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<algorithm>
#include<vector>
#include<string>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<functional>
#include<map>
#include<unordered_set>
using namespace std;
/*int p = 998244353;*/
int p = 1000000007;
#define int long long
#define vel vector<long long>
#define vvel vector<vel>
#define rep(i,n) for(int i=0;i<n;i++)
#define sor(v) sort(v.begin(),v.end())
#define mmax(a,b) a=max(a,b)
#define mmin(a,b) a=min(a,b)
#define mkp make_pair
#define pin pair<int,int>
#define qin pair<int,pin>
#define V vector
#define Endl endl
#define veb vector<bool>
#define rev(s) reverse(s.begin(),s.end())
#define end_pr(s) cout << s <<endl;return 0
signed main(){
	V<string> v = { "thu","fri","sat","sun","mon","tue","wed" };
	int x; cin >> x;
	cout << v[x % 7] << endl;
}

C++: #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i,n) for (int i=0;i<(int)(n);i++)
#define codefor int test;scanf("%d",&test);while(test--)
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define yn(ans) if(ans)printf("Yes\n");else printf("No\n")
#define YN(ans) if(ans)printf("YES\n");else printf("NO\n")
#define vector2d(type,name,h,...) vector<vector<type>>name(h,vector<type>(__VA_ARGS__))
#define umap unordered_map
#define uset unordered_set
using namespace std;
using ll = long long;
const int MOD=1000000007;
//入力系
void scan(int& a){scanf("%d",&a);}
void scan(long long& a){scanf("%lld",&a);}
template<class T> void scan(T& a){cin>>a;}
template<class T> void scan(vector<T>& vec){for(auto&& it:vec)scan(it);}
void in(){}
template <class Head, class... Tail> void in(Head& head, Tail&... tail){scan(head);in(tail...);}
//出力系
void print(const int& a){printf("%d",a);}
void print(const long long& a){printf("%lld",a);}
void print(const double& a){printf("%.15lf",a);}
template<class T> void print(const T& a){cout<<a;}
template<class T> void print(const vector<T>& vec){if(vec.empty())return;print(vec[0]);for(auto it=vec.begin();++it!= vec.end();){putchar(' ');print(*it);}}
void out(){putchar('\n');}
template<class T> void out(const T& t){print(t);putchar('\n');}
template <class Head, class... Tail> void out(const Head& head,const Tail&... tail){print(head);putchar(' ');out(tail...);}
//デバッグ系
template<class T> void dprint(const T& a){cerr<<a;}
template<class T> void dprint(const vector<T>& vec){if(vec.empty())return;cerr<<vec[0];for(auto it=vec.begin();++it!= vec.end();){cerr<<" "<<*it;}}
void debug(){cerr<<endl;}
template<class T> void debug(const T& t){dprint(t);cerr<<endl;}
template <class Head, class... Tail> void debug(const Head& head, const Tail&... tail){dprint(head);cerr<<" ";debug(tail...);}
ll intpow(ll a, ll b){ ll ans = 1; while(b){ if(b & 1) ans *= a; a *= a; b /= 2; } return ans; }
ll modpow(ll a, ll b, ll p){ ll ans = 1; while(b){ if(b & 1) (ans *= a) %= p; (a *= a) %= p; b /= 2; } return ans; }

int main(){
    vector<string> vec={"thu","fri","sat","sun","mon","tue","wed"};
    INT(n);
    out(vec[n%7]);
}

C++: #include <bits/stdc++.h>  // g++ -std=c++14 -o a a.cpp

using namespace std;

typedef pair<int, int> P;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define repto(i, n) for(int i = 0; i <= (n); i++)
#define all(c) (c).begin(), (c).end()
#define uniq(c) c.erase(unique(all(c)), (c).end()) // ユニークなvectorにする。連続した値を除去して切り出す。
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

int main() {
  int X;
  cin >> X;
  int dayOfWeek = X % 7;

  if (dayOfWeek == 0) cout << "thu" << endl;
  if (dayOfWeek == 1) cout << "fri" << endl;
  if (dayOfWeek == 2) cout << "sat" << endl;
  if (dayOfWeek == 3) cout << "sun" << endl;
  if (dayOfWeek == 4) cout << "mon" << endl;
  if (dayOfWeek == 5) cout << "tue" << endl;
  if (dayOfWeek == 6) cout << "wed" << endl;
  
}

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

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
    int x;
    cin >> x;
    if (x >= 9) x -= 9;
    else {
        x += 5;
    }
    if (x % 7 == 0) {
        cout << "sat" << '\n';
    } else if (x % 7 == 1) {
        cout << "sun" << '\n';
    } else if (x % 7 == 2) {
        cout << "mon" << '\n';
    } else if (x % 7 == 3) {
        cout << "tue" << '\n';
    } else if (x % 7 == 4) {
        cout << "wed" << '\n';
    } else if (x % 7 == 5) {
        cout << "thu" << '\n';
    } else {
        cout << "fri" << '\n';
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    string a[]={"thu","fri","sat","sun","mon","tue","wed"};
    int b;
    cin >> b;
    cout << a[b%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);
	if(x%7!=0) printf("%s\n",a[x%7-1]);
	else printf("thu\n");
}

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

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

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
    int day;
    cin>>day;
    string hk[]{"fri","sat","sun","mon","tue","wed","thu"};
    cout<<hk[(day-1)%7]<<endl;
    return 0;
}

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

C++: #include <iostream>

using namespace std;

int main() {
    string date[7] = {"fri", "sat", "sun", "mon", "tue", "wed", "thu"};

    int X;
    cin >> X;

    cout << date[X % 7 - 1] << endl;
}

C++: #include <iostream>

using namespace std;

int main(){
	int x;

	cin >> x;

	if (x % 7 == 2){
		cout << "sat" << endl;
	}else if (x % 7 == 1){
		cout << "fri" << 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 {
		cout << "thu" << endl;
	}
}

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

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

int main(){
	int X;
	cin >> X;
	cout << day[X%7] << endl;

	return 0;
}

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


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

}