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<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define all(c) (c).begin(),(c).end()
#define pb push_back
#define dbg(...) do{cerr<<__LINE__<<": ";dbgprint(#__VA_ARGS__, __VA_ARGS__);}while(0);

using namespace std;

namespace std{template<class S,class T>struct hash<pair<S,T>>{size_t operator()(const pair<S,T>&p)const{return ((size_t)1e9+7)*hash<S>()(p.first)+hash<T>()(p.second);}};template<class T>struct hash<vector<T>>{size_t operator()(const vector<T> &v)const{size_t h=0;for(auto i : v)h=h*((size_t)1e9+7)+hash<T>()(i)+1;return h;}};}
template<class T>ostream& operator<<(ostream &os, const vector<T> &v){os<<"[ ";rep(i,v.size())os<<v[i]<<(i==v.size()-1?" ]":", ");return os;}template<class T>ostream& operator<<(ostream &os,const set<T> &v){os<<"{ "; for(const auto &i:v)os<<i<<", ";return os<<"}";}
template<class T,class U>ostream& operator<<(ostream &os,const map<T,U> &v){os<<"{";for(const auto &i:v)os<<" "<<i.first<<": "<<i.second<<",";return os<<"}";}template<class T,class U>ostream& operator<<(ostream &os,const pair<T,U> &p){return os<<"("<<p.first<<", "<<p.second<<")";}
void dbgprint(const string &fmt){cerr<<endl;}template<class H,class... T>void dbgprint(const string &fmt,const H &h,const T&... r){cerr<<fmt.substr(0,fmt.find(","))<<"= "<<h<<" ";dbgprint(fmt.substr(fmt.find(",")+1),r...);}
typedef long long ll;typedef vector<int> vi;typedef pair<int,int> pi;const int inf = (int)1e9;const double INF = 1e12, EPS = 1e-9;

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

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

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

int main(void){
    int n;
    cin >> n;
    cout << week[n%7] << endl;
    return 0;
}

C++: #include<bits/stdc++.h>
#define all(vec) vec.begin(),vec.end()
using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;
const ll MOD=10000000;
const ll INF=1000000001;
const ll LINF=4000000000000000010;
const double EPS=1e-9;
int dx[5]={0,1,0,-1,0};
int dy[5]={1,0,-1,0,0};
int main(){
    int x;cin>>x;
    int d[31];
    d[9]=5;
    for(int i=8;i>=1;i--){
        d[i]=(d[i+1]-1+7)%7;
    }
    for(int i=10;i<=30;i++){
        d[i]=(d[i-1]+1)%7;
    }
    if(d[x]==0){
        cout<<"mon"<<endl;
    }else if(d[x]==1){
        cout<<"tue"<<endl;
    }else if(d[x]==2){
        cout<<"wed"<<endl;
    }else if(d[x]==3){
        cout<<"thu"<<endl;
    }else if(d[x]==4){
        cout<<"fri"<<endl;
    }else if(d[x]==5){
        cout<<"sat"<<endl;
    }else{
        cout<<"sun"<<endl;
    }
}

C++: #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main(){
	int n;
	cin >> n;
	if(n%7 == 0){
		cout<<"thu"<<endl;
	}
	if(n%7==1){
		cout<<"fri"<<endl;
	}
	if(n%7==2){
		cout<<"sat"<<endl;
	}
	if(n%7==3){
		cout<<"sun"<<endl;
	}
	if(n%7==4){
		cout<<"mon"<<endl;
	}
	if(n%7 == 5){
		cout<<"tue"<<std::endl;
	}
	if(n%7==6){
		cout<<"wed"<<endl;
	}

}

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

using namespace std;
using llong = long long;
using ldbl = long double;
using P = pair<llong, llong>;

#define ALL(x) x.begin(), x.end()

const llong inf = llong(1e18)+7;
const llong mod = 1e9+7;

int main(){
	llong x;
	cin >> x;
	string s[7] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};

	cout << s[x%7] << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int x,a;
    cin>>x;
    a=x-9;
    if(a==-8||a==-1||a==6||a==13||a==20){
      cout<<"fri"<<endl;
    }
    else if(a==-2||a==5||a==12||a==19){
           cout<<"thu"<<endl;
    }
    else if(a==-3||a==4||a==11||a==18){
           cout<<"wed"<<endl;
    }
    else if(a==-4||a==3||a==10||a==17){
           cout<<"tue"<<endl;
    }
    else if(a==-5||a==2||a==9||a==16){
           cout<<"mon"<<endl;
    }
    else if(a==-6||a==1||a==8||a==15){
           cout<<"sun"<<endl;
    }
    else{
        cout<<"sat"<<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 dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

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

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<map>
#include<cstring>
#include<math.h>
#include<bitset>
#include<queue>
#include<set>
#include<iomanip>
#include<math.h>
#include<assert.h>
#include<string>
#include<cstdlib>
#include<cctype>
#include<unordered_map>
#include<sstream>
#include<numeric>
#include<stack>
// #include<bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int,int>;
constexpr ll INF = 1LL<<60;
const double INFD = 1e100;
const ll mod = 1000000007;
const double PI = 3.1415926535897932384626433832795028841971;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
};
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
};

// intやllをstringに変換
template<typename T> inline string toString(const T &a){
  ostringstream oss;
  oss << a;
  return oss.str();
};
// ----------------------------------------------------------------------------

int main(){
  int x;
  cin >> x;
  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;
  }else if(x%7==4){
    cout << "mon" << endl;
  }else if(x%7==5){
    cout << "tue" << endl;
  }else if(x%7==6){
    cout << "wed" << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int date;
    cin >> date;
    switch(date%7){
        case 4:
        cout<<"mon";
        break;
        case 5:
        cout <<"tue";
        break;
        case 6:
        cout << "wed";
        break;
        case 0:
        cout << "thu";
        break;
        case 1:
        cout << "fri";
        break;
        case 2:
        cout << "sat";
        break;
        case 3:
        cout << "sun";
        break;
    }
    cout << endl;
    return 0;
}

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

int main(){
    int day=0;
    cin>>day;

    switch(day%7){
        case 0:
        cout<<"thu"<<endl;
        break;
        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;
    }
return 0;
}