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 count=X%7;
  if(count==0)
    cout<<"thu"<<endl;
  if(count==1)
    cout<<"fri"<<endl;
  if(count==2)
    cout<<"sat"<<endl;
  if(count==3)
    cout<<"sun"<<endl;
  if(count==4)
    cout<<"mon"<<endl;
  if(count==5)
    cout<<"tue"<<endl;
  if(count==6)
    cout<<"wed"<<endl;
  return 0;
}

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

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

int main(){
 int x;
 cin>>x;
 switch(x%7){
     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;
     case 1:cout<<"fri"<<endl; break;
     case 2:cout<<"sat"<<endl; break;
 }   
 return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#define all(x) (x).begin(),(x).end()
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
typedef long long ll; const int inf = INT_MAX / 2; const ll infl = 1LL << 60;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/






int X;
vector<string> month = { "thu", "fri", "sat", "sun", "mon", "tue","wed" };
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> X;
    cout << month[X % 7] << endl;
}

C++: //3
#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cmath>
#include <map>
#include <set>
#include <string>
#include<bitset>

using namespace std;
#define loop(i,n) for(int i = 0; i < (n); ++i)
#define loops(i,f,n) for(int i = (f); i < (n); ++i)
#define INF 9999999
#define lint long long int
#define VEC vector<int>
#define VEC2 vector<vector<int>>

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int x;
	cin >> x;
	string ans;
	switch (x % 7)
	{
	case 0:
		ans = "thu";
		break;
	case 1:
		ans = "fri";
		break;
	case 2:
		ans = "sat";
		break;
	case 3:
		ans = "sun";
		break;
	case 4:
		ans = "mon";
		break;
	case 5:
		ans = "tue";
		break;
	case 6:
		ans = "wed";
		break;
	}
	cout << ans << endl;
}

C++: #include <iostream>
using namespace std;
int main(void){
   int X;
   cin>>X;
   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;
   }
   else if(X%7==1){
   cout<<"fri"<<endl;
   }
   else if(X%7==2){
   cout<<"sat"<<endl;
   }
   else if(X%7==3){
   cout<<"sun"<<endl;
   }
}

C++: #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i,s,e) for(int (i) = (s);(i) <= (e);(i)++)
#define all(x) x.begin(),x.end()
struct revran {
  const i64 b, e;
  struct iter {
    i64 i;
    constexpr iter(const i64 i) noexcept: i(i) {}
    void operator++() noexcept { --i; }
    constexpr i64 operator*() const noexcept { return i; }
    constexpr bool operator!=(const iter x) const noexcept { return i != x.i; }
  };
  constexpr revran(const i64 e) noexcept: b(0), e(e) {}
  constexpr revran(const i64 b, const i64 e) noexcept: b(b), e(e) {}
  constexpr iter begin() const noexcept { return iter(e - 1); }
  constexpr iter end() const noexcept { return iter(b - 1); }
};

struct ran {
  const i64 b, e;
  struct iter {
    i64 i;
    constexpr iter(const i64 i) noexcept: i(i) {}
    void operator++() noexcept { ++i; }
    constexpr i64 operator*() const noexcept { return i; }
    constexpr bool operator!=(const iter x) const noexcept { return i != x.i; }
  };
  constexpr ran(const i64 e) noexcept: b(0), e(e) {}
  constexpr ran(const i64 b, const i64 e) noexcept: b(b), e(e) {}
  constexpr iter begin() const noexcept { return iter(b); }
  constexpr iter end() const noexcept { return iter(e); }
  constexpr revran rev() const noexcept { return revran(b, e); }
};

constexpr ran rin(const i64 e) noexcept { return ran(1, e + 1); }
constexpr ran rin(const i64 b, const i64 e) noexcept { return ran(b, e + 1); }

int main() {
  i64 x;
  cin >> x;
  vector<string> vec(7);
  vec[0] = "sat";
  vec[1] = "sun";
  vec[2] = "mon";
  vec[3] = "tue";
  vec[4] = "wed";
  vec[5] = "thu";
  vec[6] = "fri";
  cout << vec[(((x - 9) % 7) + 7) % 7] << endl;
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
#include<math.h>
int main()
{
	int x;
	cin>>x;
	if(x==4||x==11||x==18||x==25)
		cout<<"mon"<<endl;
	if(x==5||x==12||x==19||x==26)
		cout<<"tue"<<endl;
	if(x==6||x==13||x==20||x==27)
		cout<<""<<endl;
	if(x==7||x==14||x==21||x==28)
		cout<<""<<endl;
	if(x==1||x==8||x==15||x==22||x==29)
		cout<<""<<endl;
	if(x==2||x==9||x==16||x==23||x==30)
		cout<<""<<endl;
	if(x==3||x==10||x==17||x==24)
		cout<<""<<endl;
	return 0;
}