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>
using namespace std ;

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

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

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

	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(void){
    int x;
    cin >> x;
    
    if( x%7 == 2 ){
        cout << "sat";
    }
    else if( x%7 == 1 ){
        cout << "fri";
    }
    else if( x%7 == 3){
        cout << "sun";
    }
    else if( x%7 == 4){
        cout << "mon";
    }
    else if( x%7 == 5){
        cout << "tue";
    }
    else if( x%7 == 6){
        cout << "wed";
    }
    else if( x%7 == 0){
        cout << "thu";
    }
    cout << endl;
    
}

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

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

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

int main()
{
    int d;

    cin >> d;

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

    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 << "sun" << endl;
		break;
	case 4:
		cout << "mon" << endl;
		break;
	case 5:
		cout << "tue" << endl;
		break;
	case 6:
		cout << "wed" << endl;
		break;
	}
	return 0;
}

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

using namespace std;

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

int main(void){
    int a;
    cin >> a;
    cout << s[a % 7] <<endl;
}

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

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

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

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

C++: #include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;

//const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1};
//const int dy[] = {0, 1, 0, -1, 1, 1, -1, -1};

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

C++: #include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
using namespace std;
signed main() {
  string c[7] = { "fri", "sat", "sun", "mon", "tue", "wed", "thu" };
  int i; cin >> i;
  cout << c[(i-1)%7] << endl;
}

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

C++: #include<bits/stdc++.h>
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;
  }
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	int x,a;
	cin >> x;
	a =x%7;

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

	return 0;
}

C++: //============================================================================
// Name        : AOJ.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>
#include <algorithm>

using namespace std;

int 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 x;cin>>x;
  string str;
  switch (x%7){
  case 4:
    str="mon";
    break;
  case 5:
    str="tue";
    break;
  case 6:
    str="wed";
    break;
  case 0:
    str="thu";
    break;
  case 1:
    str="fri";
    break;
  case 2:
    str="sat";
    break;
  case 3:
    str="sun";
    break;
  default:
    break;
  }
  cout<<str<<endl;
}

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

C++: #include <iostream>
using namespace	std;
int main(){

  int n;
  cin>>n;

  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;
  if(n%7==0) cout<<"thu"<<endl;

  return 0;

}

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

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

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

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

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