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++: #define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;i++)
#define Rep(i,a,b) for(int i=0;i<b;i++)
#define REP(i,a,b) for(int i=0;i<=b;i++)
#define rev(i,n) for(int i=n-1;i>=0;i--)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define MEMSET(a) memset(a,0,sizeof(a))
#define inf (1ll<<60)
#define Yes(f) cout <<(f?"Yes":"No")<<endl//fが真の場合Yesを出力、偽の場合Noを出力
#define yes(f) cout <<(f?"yes":"no")<<endl
#define YES(f) cout <<(f?"YES":"NO")<<endl
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())

using namespace std;

const int mod=1e9+7;



signed main(){
    int x;
    cin >> x;
    x=x%7;

        if(x==0)
        {
            cout << "thu" << endl;
        }
        if(x==1)
        {
            cout<<"fri"<<endl;
        }
        if(x==2)
        {
            cout << "sat" <<endl;
        }
        if(x==3)
        {
            cout << "sun" << endl;
        }
        if(x==4)
        {
            cout << "mon" << endl;
        }
        if(x==5)
        {
            cout << "tue" << endl;
        }
        if(x==6)
        {
            cout << "wed" << endl;
        }
    return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll INF = 1e16;
const ll mod = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

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;
}
int ctoi(char c) {
  if (c >= '0' && c <= '9') {
    return c - '0';
  }
  return 0;
}
ll factorial(ll n) {
  if (n == 1) {
    return 1;
  }
  ll ans = factorial(n-1);
  return ans*n;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a%b);
}
ll lcm(ll a, ll b) {
  return (a/gcd(a, b))*b;
}
bool is_prime(ll n) {
  for (ll i = 2; i*i <= n; i++) {
    if (n%i == 0) return false;
  }
  return n != 1;
}
ll mod_pow(ll x, ll n, ll mod) {
  if (n == 0) return 1;
  ll res = mod_pow(x*x%mod, n/2, mod);
  if (n & 1) res = res * x % mod;
  return res;
}

int main() {
  ll 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" << endl;
  if (n%7 == 6) cout << "wed" << endl;
}

C++: #include <bits/stdc++.h>
#define rep0(i,n) for (int i = 0; i < (n); ++i)  //0index
#define rep1(i,n) for (int i = 1; i < (n); ++i)  //1index
#define REP(i,a,b) for (int i = a; i < (b); ++i)  //aからb - 1まで
#define mREP(i,a,b) for (int i = a; i > (b); --i)  //逆
#define all(x) (x).begin(),(x).end()
const int INF = 1000000007;  //最大値兼MOD
typedef long long ll;
using namespace std;
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; }
ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a; }
int main(){
  int a;
  cin >> a;
  a %= 7;
  if(a == 0)cout << "thu" << endl;
  else 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 cout << "wed" << endl;
  return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int x,i;
  cin>>x;
    if(x%7==2){
      printf("sat\n");
    }
    else  if(x%7==1){
      printf("fri\n");
    }
    else if(x%7==3){
      printf("sun\n");
    }
    else if(x%7==4){
      printf("mon\n");
    }
    else if(x%7==5){
      printf("tue\n");
    }
    else if(x%7==6){
      printf("wed\n");
    }
    else {
      printf("thu\n");
    }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int x;
    cin>>x;
    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;
    }
    else if(x%7==1){
        cout<<"fri"<<endl;
    }
    
}

C++: #include <iostream>
using namespace std;
int main(void){
    int X;
    string Day[7] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
    while(cin >> X){
        cout << Day[X % 7] << endl;
    }
}

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

main(){
  string D[] = {"thu", "fri", "sat", "sun", "mon", "tue", "weds"};
  int x; cin >> x;
  cout << D[x%7] << endl;
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
using namespace std;
using LL = long long;
constexpr long long MOD = 1000000000 + 7;
constexpr long long INF = 1000000000;
const double PI = acos(-1);

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 << "sum" << endl;
	if (n % 7 == 4)cout << "mon" << endl;
	if (n % 7 == 5)cout << "tue" << endl;
	if (n % 7 == 6)cout << "wed" << endl;
}

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

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

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

int main(){
  int day;
  cin >> day;
  day += 3;
  day = day % 7;
  switch(day){
    case 0: cout << "mon" << endl;  break;#include<iostream>
using namespace std;

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

    case 1: cout << "tue" << endl;  break;
    case 2: cout << "wed" << endl;  break;
    case 3: cout << "thu" << endl;  break;
    case 4: cout << "fri" << endl;  break;
    case 5: cout << "sat" << endl;  break;
    case 6: cout << "sun" << endl;  break;
  }
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    string s[] = {"sat", "sun", "mon", "tue", "wed", "thu", "fri"};
    cout << s[(n % 7 + 5) % 7] << endl;
    return 0;
}