Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
	"time"
)

var sc = bufio.NewScanner(os.Stdin)

//Sliceconvtoi ...
func Sliceconvtoi() []int {
	strs := strings.Split(sc.Text(), " ")

	var ints []int
	var x int

	for _, s := range strs {
		x, _ = strconv.Atoi(s)
		ints = append(ints, x)
	}

	return ints
}

func main() {
	for sc.Scan() {
		var dt string
		i := Sliceconvtoi()
		t := time.Date(2017, 9, i[0], 0, 0, 0, 0, time.Local)

		switch t.Weekday() {
		case time.Monday:
			dt = "mon"
		case time.Tuesday:
			dt = "tue"
		case time.Wednesday:
			dt = "wed"
		case time.Thursday:
			dt = "thu"
		case time.Friday:
			dt = "fri"
		case time.Saturday:
			dt = "sat"
		case time.Sunday:
			dt = "sun"
		default:
		}

		fmt.Println(dt)
	}

}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
#include <cmath>
#include <string>
#define FI first
#define SE second
#define VE vector<int>
#define PB push_back
#define PA pair<int,int>
#define MA make_pair
#define LL long long
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ROF(i,a,b) for(int i=b-1;i>=a;i--)
#define YES(i) cout<<(i?"YES":"NO")<<endl
#define Yes(i) cout<<(i?"Yes":"No")<<endl
using namespace std;
//
const int INF=1e9+7;
//
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{
    cout<<"thu"<<endl;
  }
  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>
#include <vector>
#include <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>
#include <set>
#include <bitset>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
typedef std::pair<int,int> pii;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;


int main(){
    string s[]={"mon","tue","wed","thu","fri","sat","sun"};
    int x;cin>>x;
    int t=1;
    int ans=4;
    while(t!=x){
        t++;
        ans++;
        if(ans==7)ans=0;
    }
    cout<<s[ans]<<endl;
    
    return 0;
}

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

C++: #include<stdio.h>
int main(void)
{
	int x;
	scanf("%d",&x);
	x=x%7;
	if(x==0) printf("thu\n");
	if(x==1) printf("fri\n");
	if(x==2) printf("sat\n");
	if(x==3) printf("sun\n");
	if(x==4) printf("mon\n");
	if(x==5) printf("tue\n");
	if(x==6) printf("wed\n");
	return 0;
}

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

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

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

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

	return 0;
}

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

template<class T> void vin(vector<T>& v, int n) {
    v.resize(n);
    for (int i = 0; i < n; ++i) {
        cin >> v[i];
    }
}

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

int main() {
    int x;
    cin >> x;
    cout << ans[x%7] << endl;
}

C++: #include<stdio.h>
int main()
{
	int x,r;
	scanf("%d",&x);
	r=x%7;
	switch(r){
	case 1:
		printf("fri\n");
		break;
	case 2:
		printf("sat\n");
		break;
	case 3:
		printf("sun\n");
		break;
	case 4:
		printf("mon\n");
		break;
	case 5:
		printf("tue\n");
		break;
	case 6:
		printf("wed\n");
		break;
	default:
		printf("thu\n");
	}
    return 0;
}

C++: 
#include<set>
using namespace std;
#include<iostream>
int	main(){
	/*
	while(true){
	
	int A,B,C,D,E,F,G,H,I,J,answer;
		
	cin >> A;
	if(A == 0) return 0;
	cin >> B >> C >> D >> E >> F >> G >> H >> I >> J;
	answer = A - B - C - D-E-F-G-H-I-J;
	cout << answer << endl;

	}
	*/
	/*
	int A,B,C,D,E,F;

	cin >> A, B, C, D;
	if(A < B, C, D){ 
		cout << B + C + D << endl;
	}
	
	else if(B < A, C, D){
		cout << A + C + D << endl;
	}

	else if(C < A && C < B && C < D){
		cout << A + B + D << endl;
	}

	else if(D < A && D < B && D < C){
		cout << A + B + C << endl;
	}

	if(E < F){
		cout << F << endl;
	}

	else{
		cout << E << endl;
	}
	
	return 0;
}*/
	/*
	int N, M;
	cin >> N >> M;
	cout << N + M << endl << N - M << endl << N * M << endl << N / M << endl;
}*/

/*int N, M; 
	cin >> N >> M;
	cout << N % M << endl;
}*/

/*	int N;
	cin >> N;
	cout << -(N % 2)+1 ;
}*/

	/*int A, B, C, D, E ;
	cin >> A >> B >> C >> D >> E;
	cout << (A + B + C + D + E) / 5 ;
}*/

	/*int A, B, C, D ;
	cin >> A >> B >> C >> D;
	cout << (A + B + C + D) / 60 << endl << (A + B + C + D) % 60 << endl;
	*/

/*	int A,B;
	cin >> A >> B;
	cout << ( A + B ) / 2 << endl;*/

/*	int m, f, b;
	cin >> m >> f >> b;

	if ( m + f >= b && m <= b ){
		cout << b - m << endl;
	}
	
	if ( m + f > b && m > b ){
		cout << 0 << endl;
	}


	if ( m + f < b ){
		cout << "NA" << endl;
	}*/

	int X , x ;
	cin >> X ;

	x = X % 7 ;

	if ( x == 2 ){
		cout << "sat" << endl;
	}

	if ( x == 3 ){
		cout << "san" << endl;
	}

	if ( x == 4 ){
		cout << "mon" << endl;
	}

	if ( x == 5 ){
		cout << "tue" << endl;
	}

	if ( x == 6 ){
		cout << "wed" << endl;
	}

	if ( x == 0 ){
		cout << "thu" << endl;
	}

	if ( x == 1 ){
		cout << "fri" << endl;
	}
}

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

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

int main(){
    int x;  cin>>x;
    while(x<9)x+=7;
    int a=x-9;

    int res=abs(a)%7;

//    if(x<9)res+=7;

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





    return 0;
}