Go: package main

import "fmt"

func main() {
	week := []string{"sun", "mon", "tue", "wed", "thu", "fri", "sat"}

	var day int
	fmt.Scan(&day)
	fmt.Println(week[(day+4)%7])//土曜日が9日という基準に揃えるために+4
}

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

using namespace std;
using ll = long long;
using VI = vector<int>;
using VL = vector<ll>;
#define FOR(i, a, n) for(int (i)=(a);(i)<(n);(i)++)
#define eFOR(i, a, n) for(int (i)=(a);(i)<=(n);(i)++)
#define rFOR(i, a, n) for(int (i)=(n)-1;(i)>=(a);(i)--)
#define erFOR(i, a, n) for(int (i)=(n);(i)>=(a);(i)--)
#define SORT(i) sort((i).begin(),(i).end())
#define rSORT(i, a) sort((i).begin(),(i).end(),(a))
#define all(i) (i).begin(),(i).end()
constexpr ll INF = 1000000000;
//constexpr ll LLINF = 1LL << 60;
constexpr ll mod = 1000000007;
constexpr ll MOD = 998244353;

//template<class T>
//inline bool chmax(T &a, T b) {
//    if (a < b) {
//        a = b;
//        return 1;
//    }
//    return 0;
//}

template<class T>
inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return 1;
    }
    return 0;
}

inline void init() {
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
}

template<class T>
inline istream &operator>>(istream &input, vector<T> &v) {
    for (auto &elemnt : v)input >> elemnt;
    return input;
}

int main() {
    init();
    int x;
    string day_list[7] = {"fri", "sat", "sun", "mon", "tue", "wed", "thu"};
    cin >> x;
    if(x%7==0) {
        cout << day_list[6] << endl;
        return 0;
    }else{
        cout << day_list[x % 7 - 1] << endl;
    }
    return 0;
}

C++: #include "iostream"
#include "math.h"
#include "algorithm"
#include "string"
#include "vector"
using namespace std;

int main() {
	int x;
	cin >> x;
	int y;
	if (x >= 9) {
		y = (x - 9) % 7;
	}
	else {
		y = (x + 21 - 9) % 7;
	}
	string day;
	switch (y) {
	case 0:
		day = "sat";
		break;
	case 1:
		day = "sun";
		break;
	case 2:
		day = "mon";
		break;
	case 3:
		day = "tue";
		break;
	case 4:
		day = "wed";
		break;
	case 5:
		day = "thu";
		break;
	case 6:
		day = "fri";
		break;
	}
	cout << day << endl;
}

C++: #include<iostream>
using namespace std;
int main() {
	int x; cin >> x;
	switch (x){
	case 2:
		cout << "sat\n";
		break;
	case 3:
		cout << "sun\n";
		break;
	case 4:
		cout << "mon\n";
		break;
	case 5:
		cout << "tue\n";
		break;
	case 6:
		cout << "wed\n"; break;
	case 0:
		cout << "thu\n"; break;
	case 1:cout << "fri\n";
	default:
		break;
	}
}

C++: import java.util.Calendar;
import java.util.Locale;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNextInt()) {
            int X = sc.nextInt();

            Calendar calendar = Calendar.getInstance();
            calendar.set(2017, Calendar.SEPTEMBER, X);
            System.out.println(calendar.getDisplayName(
                Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.ENGLISH).toLowerCase());
        }
    }
}

C++: #include <iostream>
using namespace std;
int main(void){
    int X,Y;
    cin>>X;
    Y=X%7;
    switch(Y){
        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;
    }
}

C++: #include<iostream>
using namespace std;
int main(){
	int a;
	cin >> a;
	switch (a % 7){
	case 0:
		cout << "thu";
		break;
	case 1:
		cout << "fri";
		break;
	case 2:
		cout << "sat";
		break;
	case 3:
		cout << "san";
		break;
	case 4:
		cout << "mon";
		break;
	case 5:
		cout << "thu";
		break;
	case 6:
		cout << "wed";
		break;
	}



	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;

string day[]{"mon","tue","wed","thu","fri","sat","sun"};
int ans[100];
int main(){
	int x;scanf("%d",&x);
	ans[9]=5;
	for(int i=8;i>=1;i--){
		if(ans[i+1]==0)ans[i]=6;
		else ans[i]=ans[i+1]-1;
	}
	for(int i=10;i<=30;i++){
		ans[i]=(ans[i-1]+1)%7;
	}
	cout<<day[ans[x]]<<endl;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int x;

	cin >> x;

	char w[][4] = {"sun", "mon", "tue", "wed", "thu", "fri", "sat"};

	cout << w[(x + 4) % 7] << endl;

	return 0;
}

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

#define int long long
#define pb push_back 
#define mp make_pair
#define fr first
#define sc second
#define Rep(i, n) for( int i = 0; i < (n); i++ )
#define Rrep(i, a, n) for( int i = (a); i < (n); i++ )
#define All(v) v.begin(), v.end()

typedef pair<int, int> Pii; 
typedef pair<int, Pii> Pip;
const int INF = 1107110711071107;

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

C++: #include<bits/stdc++.h>
using namespace std;
int x;
string s[]={"thu","fri","sat","sun","mon","tue","wed"};
main(){
  cin>>x;
  cout<<s[x%7]<<endl;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main() {
	int n;
	cin >> n;
	vector<string> v = { "sat","fri","thu","wed","tue","mon","sunn" };
	int dis = (max(n, 9) - min(n, 9)) % 7;
	cout << v[dis] << endl;
}

C++: #include <iostream>

using namespace std;

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

    int X;
    cin >> X;

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

C++: #include <iostream>
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;
}

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;
}