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(){
  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){
      case 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 <iostream>
using namespace std;string w[7]={"thu","fri","sat","sun","mon","tue","wed"};
int main(){int i;cin>>i;cout<<w[i%7]<<endl;}

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll

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

signed main() {
	string day[7] = {
    "fri",
    "sat",
    "sun",
    "mon",
    "tue",
    "wed",
    "thu"
  };
  ll a;
  cin >> a;
  a %= 7;
  cout << day[a - 1] << endl;
}

C++: #include <stdio.h>
int main(){
    int n,ans[300];
    scanf("%d",&n);
    for(int i=1;i<=30;i++)ans[i]=i%7;
    if(ans[n]==2)printf("sat\n");
    else if(ans[n]==3)printf("sun\n");
    else if(ans[n]==4)printf("mon\n");
    else if(ans[n]==5)printf("tue\n");
    else if(ans[n]==6)printf("wed\n");
    else if(ans[n]==0)printf("thu\n");
    else if(ans[n]==1)printf("fri\n");
}

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

int main()
{
	int x;
	cin >>x;
	if ( x = 1,8,15,22,29)cout <<"fri";
	if ( x = 2,9,16,23,30)cout << "sat";
	if ( x = 3,10,17,24)cout <<"sun";
	if ( x = 4,11,18,25)cout <<"mon";
	if (x=5,12,19,26)cout <<"tue";
	if (x = 6,13,20,27)cout<<"wed";
	if ( x = 7,14,21,28)cout << "thu";
	cout <<endl;
	return 0 ;
}

C++: int main() {
	int X;
	cin>>X;
		X=9-X;
		if(X<0){
			X=X*-1;
		}
		for(int i=0;X<8;i++){
			X=X-7;
		}
		switch(X){
		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;
		case 6:cout<<"fri"<<endl;
			break;
		case 7:cout<<"sat"<<endl;
			break;
		}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<climits>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<bitset>
#include<iomanip>
using namespace std;

#define rep(i,j,n) for(int i=(j);i<(n);i++)
#define rep2(i,j,n) for(int i=(j);i<=(n);i++)
#define all(i) i.begin(),i.end()

typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<string> vs;
typedef vector<vector<string>> vvs;
typedef pair<int, int> pi;
typedef long long i64;

int main() {
	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>
#include <string>
using namespace std;

int main(){
    int x;
    cin >> x;
    string week;

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

C++: #include<iostream>
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 <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <map>
#include <iomanip>
#include <stdio.h>

using namespace std;

//typedefリスト
typedef vector<long long int> vint;
typedef vector<vector<long long int>> vvint;
typedef vector<string> vstr;
typedef long long int llint;

llint gcd(llint x, llint y) {
	while (y != 0) {
		if (x > y) {
			llint r = x % y;
			x = y;
			y = r;
		}
		else {
			llint r = y % x;
			y = r;
		}
	}
	return x;
}

int main(void) {
	int X,days;
	cin >> X;
	
		days =abs( X - 9);
		int ans = days % 7;
	if (X >= 9) {
		switch (ans)
		{
		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;
		case 6:cout << "fri" << endl;
			break;
		}
	}
	else {
		switch (ans)
		{
		case 0:cout << "sat" << endl;
			break;
		case 6:cout << "sun" << endl;
			break;
		case 5:cout << "mon" << endl;
			break;
		case 4:cout << "tue" << endl;
			break;
		case 3:cout << "wed" << endl;
			break;
		case 2:cout << "thu" << endl;
			break;
		case 1:cout << "fri" << endl;
			break;
		}
	}
}

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

template<class like_bool> inline void YES(like_bool condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
template<class like_bool> inline void Yes(like_bool condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class like_bool> inline void POSS(like_bool condition){ if(condition) cout << "POSSIBLE" << endl; else cout << "IMPOSSIBLE" << endl; }
template<class like_bool> inline void Poss(like_bool condition){ if(condition)cout << "Possible" << endl; else cout << "Impossible" << endl; }
template<class like_bool> inline void First(like_bool condition){ if(condition)cout << "First" << endl; else cout << "Second" << endl; }
int character_count(string text, char character){ int ans = 0; for(int i = 0; i < text.size(); i++){ ans += (text[i] == character); } return ans; }
long power(long base, long exponent, long module){ if(exponent % 2){ return power(base, exponent - 1, module) * base % module; }else if(exponent){ long root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; }else{ return 1; }}
struct position{ int y, x; }; position move_pattern[4] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}};
template<class itr> void array_output(itr start, itr goal){ string ans; for(auto i = start; i != goal; i++){ ans += to_string(*i) + " "; } ans.pop_back(); cout << ans << endl; }
long gcd(long a, long b){ if(a && b){ return gcd(min(a, b), max(a, b) % min(a, b)); }else{ return a; }}
#define mod long(1e9 + 7)
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcount(n)

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

C++: #include <bits/stdc++.h>
using namespace std;
int main(void)
{
	int x;
	cin>>x;
	x=x%7;
	switch(x){
		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;
		case 0:
			cout<<"thu"<<endl;
			break;
	}
	return 0;
}