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 fo(i,a) for(i = 0;i < a;i++)
using namespace std;
//int kansu(int a,int b) ;
int main(void)
{
	int n,i;
	
	cin >> n ;
	i = (n + 4) % 7 ;
	switch(i){
	case 1:
		cout << "mon" << endl ;
		break ;
	case 2:
		cout << "tue" << endl ;
		break ;
	case 3:
		cout << "wed" << endl ;
		break ;
	case 4:
		cout << "thu" << endl ;
		break ;
	case 5:
		cout << "fri" << endl ;
		break ;
	case 6:
		cout << "sat" << endl ;
		break ;
	default:
		cout << "sun" << endl ;
		break ;
	}
	
	return 0 ;
}

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

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

int main(){
  int X;
  cin >> X;

  int a[31] = {0};
  for(int i = 1; i <= 31; i+=7){
    a[i] = 6;
  }
  for(int i = 2; i <= 31; i+=7){
    a[i] = 7;
  }
  for(int i = 3; i <= 31; i+=7){
    a[i] = 1;
  }

  for(int i = 4; i <= 31; i+=7){
    a[i] = 2;
  }
  for(int i = 5; i <= 31; i+=7){
    a[i] = 3;
  }
  for(int i = 6; i <= 31; i+=7){
    a[i] = 4;
  }
  for(int i = 7; i <= 31; i+=7){
    a[i] = 5;
  }

  if(a[X] == 6){cout << "fri" << endl;}
  if(a[X] == 7){cout << "sat" << endl;}
  if(a[X] == 1)cout << "sun" << endl;
  if(a[X] == 2)cout << "mon" << endl;
  if(a[X] == 3)cout << "tue" << endl;
  if(a[X] == 4)cout << "wed" << endl;
  if(a[X] == 5)cout << "thu" << endl;

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#include <bitset>
#include <iterator>
#include <iomanip>
#include <sstream>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define sym cout<<"---------"<<endl;
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define RE return 0
#define int ll

int n;
signed main(){
  cin>>n;
  int a=abs(n-9);
  if(n>=9){
    if(a%7==0){
      cout<<"sat"<<en;
    }else if(a%7==1){
      cout<<"sun"<<en;
    }else if(a%7==2){
      cout<<"mon"<<en;
    }else if(a%7==3){
      cout<<"tue"<<en;
    }else if(a%7==4){
      cout<<"wed"<<en;
    }else if(a%7==5){
      cout<<"thu"<<en;
    }else{
      cout<<"fri"<<en;
    }
  }else{
    if(a%7==0){
      cout<<"sat"<<en;
    }else if(a%7==6){
      cout<<"sun"<<en;
    }else if(a%7==5){
      cout<<"mon"<<en;
    }else if(a%7==4){
      cout<<"tue"<<en;
    }else if(a%7==3){
      cout<<"wed"<<en;
    }else if(a%7==2){
      cout<<"thu"<<en;
    }else{
      cout<<"fri"<<en;
    }
  }
  RE;
}

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

int main(){
  int x;
  cin >> x;

  x %= 7;

  switch(x){
  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;
  case 0:
    cout << "thu" << endl;

    break;
  }
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define lp(i,n) for(int i=0;i<n;i++)
#define lpin(a,i,n) for(int i=0;i<n;i++){cin>>a[i];}
int main(){
  int n;
  cin>>n;
  n%=7;
  string a;
  if(n==1) a="fri";
  if(n==2) a="sat";
  if(n==3) a="sun";
  if(n==4) a="mon";
  if(n==5) a="tue";
  if(n==6) a="wed";
  if(n==0) a="thu";
  cout<<a<<endl;
  return 0;
}

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

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

  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int X;

	cin >> X;

	switch (X % 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;
	default:break;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
using namespace std;
typedef long long ll;


int 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<<"sun"<<endl;
  }
  if(X%7==4){
    cout<<"mon"<<endl;
  }
  if(X%7==5){
    cout<<"tue"<<endl;
  }
  if(X%7==6){
    cout<<"wed"<<endl;
  }
  
	
	/*int m,f,b;
	cin>>m>>f>>b;
	if(b-m<=0){
		cout<<0<<endl;
	}
	if(b-m>0 && b-m<=f){
		cout<<b-m<<endl;
	}
	if(b-m>0 && b-m>f){
		cout<<"NA"<<endl;
	}*/
	/*int a,b;
	cin>>a>>b;
	cout<<(a+b)/2<<endl;*/
	
	/*random_device rnd;
	mt19937 mt(rnd());
	uniform_int_distribution<> rnd3(1, 3);
	
	string p1, p2, p3, p4;
	cin >> p1 >> p2 >> p3 >> p4;
	
	int t = rnd()%3;
	
	if(t == 0){
		cout << "1:" << p1 << ',' << p2 << endl;
		cout << "2:" << p3 << ',' << p4 << endl;
	}
	if(t == 1){
		cout << "1:" << p1 << ',' << p3 << endl;
		cout << "2:" << p2 << ',' << p4 << endl;
	}
	if(t == 2){
		cout << "1:" << p1 << ',' << p4 << endl;
		cout << "2:" << p2 << ',' << p3 << endl;
	}*/
	
	/*
	switch(type){
		case 0:
			cout << "1:" << p1 << ',' << p2 << endl;
			cout << "2:" << p3 << ',' << p4 << endl;
			break;
		case 1:
			cout << "1:" << p1 << ',' << p3 << endl;
			cout << "2:" << p2 << ',' << p4 << endl;
			break;
		case 2:
			cout << "1:" << p1 << ',' << p4 << endl;
			cout << "2:" << p2 << ',' << p3 << endl;
			break;
	}
	*/
	
	
	return 0;
}

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

C++: #include <iostream>

using namespace std;

int main()
{
    int x;
    cin >> x;
    auto f = [](int d) {
        switch ((d - 1) % 7) {
        case 0:
            return "fri";
        case 1:
            return "sat";
        case 2:
            return "sun";
        case 3:
            return "mon";
        case 4:
            return "tue";
        case 5:
            return "wed";
        case 6:
            return "thu";
        }
    };
    cout << f(x) << endl;
}

C++: #include <iostream>
//#include <cmath>
using namespace std;
int main(void){
    
    int x,a=0;
    cin>>x;
    a=x%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 if(a==6){
        cout<<"wed"<<endl;
    }
  
  
}