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 % 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{
        cout << "sun" << endl;
    }
}

C++: #include <bits/stdc++.h>
#define syosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> P;
typedef pair<double,double> pdd;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<string> vs;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef vector<pll> vpll;
typedef pair<P,int> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const ll INF=1ll<<60;
const double pi=acos(-1);
const double eps=1e-8;
const ll mod=1e9+7;
const int dx[4]={-1,0,1,0},dy[4]={0,-1,0,1};

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

int main(){
	cin>>x;
	x=(x+5)%7;
	cout<<s[x]<<endl;
}

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

#define int long long

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

	return 0;
}

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

int main(){
    int x;
    cin >> x;
    int n=x%7;
    if(n==0)cout << "thu";
    else if(n==1)cout << "fri";
    else if(n==2)cout << "sat";
    else if(n==3)cout << "sun";
    else if(n==4)cout << "mon";
    else if(n==5)cout << "tue";
    else if(n==6)cout << "wed";

    cout << endl;

    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define REP(i, n) rep(i, 0, n)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
#define chmax(x, y) x = max(x, y)
#define chmin(x, y) x = min(x, y)
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;
const int INF = 1e12;

signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    string youbi[7] = {"mon", "tue", "wed", "thu", "fri", "sat", "sun"};
    int d;
    cin >> d;
    cout << youbi[((5 + d - 9) % 7 + 7) % 7] << endl;
}

C++: #include <bits/stdc++.h>
#include <typeinfo>
#include <cxxabi.h>
#ifdef LOCAL
  #include "dbgtoki.hpp"
  #define DUMP(i) DEB dump((string)TOSTRING(i), demangle(typeid(i).name()), __LINE__ , i)  
#else
  #define DUMP(i)  
#endif

#define GETTYPE(i) 
#define TOSTRING(x) #x
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a):i<(b);i++)
#define SSTR( x ) static_cast< std::ostringstream & >( \
        ( std::ostringstream() << std::dec << x ) ).str()
#define ALL(s) (s).begin(), (s).end()
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()) , v.end());
using namespace std;
typedef long long unsigned int llu;
typedef long long ll;

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <map>
#include <string>
#include <queue>
#include <stack>
#include <math.h>
#include <cmath>
#include <numeric>
#include <iomanip>


#define log(x) cout<<x<<endl
#define pb push_back
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
typedef long long lint;
using namespace std;


// <<fixed<<setprecision(6)<<


int gcd(lint x, lint y){
  return y==0 ? x:gcd(y,x % y);
}


int combi(int n, int r){
  int num = 1;
  for(int i = 1; i <= r; i++){
    num = num * (n - i + 1) / i;
  }
  return num;
}

int stringcount(string s, char c) {
  return count(s.cbegin(), s.cend(), c);
}

bool isPrime(int x){
  int i;
  if(x < 2)return 0;
  else if(x == 2) return 1;
  if(x%2 == 0) return 0;
  for(i = 3; i*i <= x; i += 2) if(x%i == 0) return 0;
  return 1;
}

int binary(vector<int> a,lint key) {
  lint left = 0;
  lint right = a.size();
  while(left<right){
    lint mid = (left+right)/2;
    if(a[mid] == key){
      return 1;
    }
    else if(key<a[mid]){
      right = mid;
    }
    else{
      left = mid+1;
    }
  }
  return 0;
}



int main(){
  int a;
  cin>>a;
  if(a<=7){
  }
  else{
    while(a>7){
      a-=7;
    }
  }
  if(a==1){
    cout<<"fri"<<endl;
  }
  else if(a==2){
    cout<<"sat"<<endl;
  }
  else if(a==3){
    cout<<"sun"<<endl;
  }
  else if(a==4){
    cout<<"mon"<<endl;
  }
  else if(a==5){
    cout<<"tue"<<endl;
  }
  else if(a==6){
    cout<<"wed"<<endl;
  }
  else if(a==7){
    cout<<"thu"<<endl;
  }
}

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

C++: #include <bits/stdc++.h>
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<iostream>
using namespace std;

int main(){
  int X;
  cin>>X;
  switch(X%7){
    case 0:
      cout<<"thu";
      break;
    case 1:
      cout<<"fri";
      break;
    case 2:
      cout<<"sat";
      break;
    case 3:
      cout<<"sun";
      break;
    case 4:
      cout<<"mon";
      break;
    case 5:
      cout<<"tue";
      break;
    case 6:
      cout<<"wed";
      break;
  }
  cout<<endl;
  return 0;
}

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())
#define _1 first
#define _2 second
#define pb push_back
#define INF 1145141919
#define MOD 1000000007
#define DEBUG(x) cout << #x << ": " << x << endl;

int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};

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

int main() {
    vector<string> weeks = {"sat", "sun", "mon", "tue",  "wed", "thu", "fri"};
    int X;
    cin >> X;
    int i = ((X - 9) + 14) % 7;
    
    cout << weeks[i] << endl;
}