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 <bits/stdc++.h>

#define rep(i,n) for(long long int (i)=0;(i)<(int)(n);(i)++)
#define rrep(i,a,b) for(long long int i=(a);i<(b);i++)
#define rrrep(i,a,b) for(long long int i=(a);i>=(b);i--)
#define all(v) (v).begin(), (v).end()
#define pb(q) push_back(q)
#define Abs(a,b) max(a,b)-min(a,b)
#define YES(condition) if(condition){cout << "YES" << endl;}else{cout << "NO" << endl;}
#define Yes(condition) if(condition){cout << "Yes" << endl;}else{cout << "No" << endl;}
#define Cout(x) cout<<(x)<<endl
#define POSSIBLE(condition) if(condition){cout << "POSSIBLE" << endl;}else{cout << "IMPOSSIBLE" << endl;}
#define Possible(condition) if(condition){cout << "Possible" << endl;}else{cout << "Impossible" << endl;}
#define possible(condition) if(condition){cout << "possible" << endl;}else{cout << "impossible" << endl;}
#define Size(n) (n).size()

typedef long long ll;


using namespace std;

const int INF = 1e9,MOD = 1e9 + 7,ohara = 1e6;
const ll LINF = 1e18;


long long int n,cnt=0,ans=0,a,b,c,d,cmp,cmpp,m,h,w,x,y,sum=0,pos;
int dy[]={1,0,-1,0};
int dx[]={0,1,0,-1};
string alph("abcdefghijklmnopqrstuvwxyz"),s;
bool fl;
struct edge{int to,cost;};

//-------------------------↓↓↓↓↓↓------------------------

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

      
     cin >> x;
     if(x % 7 == 0)Cout("thu");
     else if(x % 7 == 1)Cout("fri");
     else if(x % 7 == 2)Cout("sat");
     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");
     

       
return 0;
}

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

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

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

  switch(X%7){
    case 0:cout<<"thu";break;
    case 1:cout<<"fri";break;
    case 2:cout<<"sat";break;
    case 3:cout<<"sun";break;
    case 4:cout<<"mon";break;
    case 5:cout<<"tue";break;
    case 6:cout<<"wed";break;
  }
  cout<<endl;
}

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

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

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

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

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

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

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

using namespace std;

int main() {
	int x;
	cin >> x;
	switch (x % 7) {
	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 <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <stack>
#include <iomanip>

using namespace std;

#define REP(i, n) for(ll i = 0;i < n;i++)
#define REPR(i, n) for(ll i = n;i >= 0;i--)
#define FOR(i, m, n) for(ll i = m;i < n;i++)
#define FORR(i, m, n) for(ll i = m;i >= n;i--)
#define REPO(i, n) for(ll i = 1;i <= n;i++)
#define ll long long
#define INF (ll)1 << 60
#define MINF (-1 * INF)
#define ALL(n) n.begin(),n.end()
#define MOD 1000000007
#define P pair<ll, ll>

map<ll, string>m;
int main() {
	m[0] = "thu";
	m[1] = "fri";
	m[2] = "sat";
	m[3] = "sun";
	m[4] = "mon";
	m[5] = "tue";
	m[6] = "wed";
	ll n;
	cin >> n;
	cout << m[n % 7] << endl;
}

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

C++: #include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <functional>
#include <string>
#include <stack>
#include <set>
#include <sstream>
#include <iomanip>
#include <limits>
#include <cstring>

using namespace std;
using ll = long long;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<double, double >pd;
typedef pair<string, string> sP;
typedef pair<ll, P> PP;
typedef pair<P, P> PPP;

const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;
const ll INF = 1 << 30;
const ll INF2 = 9e18;
const double INF3 = 9e14;
const double eps = 1e-10;
const double PI = 3.14159265358979323846;
const int dx[4] = { 1,0,-1,0 }, dy[4] = { 0,1,0,-1 };

#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define pb push_back
#define eb emplace_back
#define fr first
#define sc second




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

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

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

char str[7][4] = {"thu", "fri", "sat", "sun", "mon", "tue", "wed"};
int main(){
	int n;
	scanf("%d", &n);
	printf("%s\n", str[n%7]);
	return 0;
}