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(void){
    // Your code here!
    int a;
    cin>>a;
    if(a%7==0){
        cout<<"thu"<<endl;
    }else if(a%7==1){
        cout<<"fri"<<endl;
    }else if(a%7==2){
        cout<<"sat"<<endl;
    }else if(a%7==3){
        cout<<"sun"<<endl;
    }else if(a%7==4){
        cout<<"mon"<<endl;
    }else if(a%7==5){
        cout<<"tue"<<endl;
    }else if(a%7==6){
        cout<<"wed"<<endl;
    }
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a;
  cin >> a;
  a %= 7;
  if(a == 1) cout << "fri" << endl;
  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;
  return (0);
}

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

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

C++: #include<stdio.h>
int main()
{
	int x;
	scanf("%d",&x);
	x%=7;
	switch(x){
	case 0:
		printf("thu\n");
		break;
	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;
	}
	return 0;
}

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

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

C++: #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
#define _overload3(_1,_2,_3,name,...) name
#define _rep(i,n) _repi(i,0,n)
#define _repi(i,a,b) for(ll i=a;i<b;++i)
#define rep(...) _overload3(__VA_ARGS__,_repi,_rep)(__VA_ARGS__)
#define _rrepi(i,a,b) for(ll i=b-1;i>=a;i--)
#define _rrep(i,n) _rrepi(i,0,n)
#define rrep(...) _overload3(__VA_ARGS__,_rrepi,_rrep)(__VA_ARGS__)
#define sum(...) accumulate(range(__VA_ARGS__),0)
#define _range(i) (i).begin(),(i).end()
#define _rangek(i,k) (i).begin(),(i).begin()+k
#define range(...) _overload3(__VA_ARGS__,a,_rangek,_range)(__VA_ARGS__)
#define LINF (ll)1000000000000000000
#define MOD (ll)1000000007
#define INF (int)1000000007
#define Yes(i) out(i?"Yes":"No")
#define YES(i) out(i?"YES":"NO")
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define vec(type,name,size) vector<type> name(size);
#define VEC(type,name,size) vector<type> name(size);in(name)
struct aaa{aaa(){cin.tie(0); cout.tie(0); ios::sync_with_stdio(0); cout<<fixed<<setprecision(15);};}aaaaaaa;
inline void in() {}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec);
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p);
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec);
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p);
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){for(T& x: vec) is >> x;return is;}
template<typename T,typename L>
istream& operator >> (istream& is, pair<T,L>& p){is >> p.first;is >> p.second;return is;}
template<typename T>
ostream& operator << (ostream& os, vector<T>& vec){os << vec[0];rep(i,1,vec.size()){os << ' ' << vec[i];}return os;}
template<typename T,typename L>
ostream& operator << (ostream& os, pair<T,L>& p){os << p.first << " " << p.second;return os;}
template <class Head, class... Tail>
inline void in(Head&& head,Tail&&... tail){cin>>head;in(move(tail)...);}
template <class T>
inline void out(T t){cout<<t<<'\n';}
template <class Head, class... Tail>
inline void out(Head head,Tail... tail){cout<<head<<' ';out(move(tail)...);}


int main(){
    INT(a);
    a%=7;
    if(a==0)out("thu");
    else if(a==1)out("fri");
    else if(a==2)out("sat");
    else if(a==3)out("sun");
    else if(a==4)out("mon");
    else if(a==5)out("tue");
    else out("wed");
}

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