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

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

char day[][4] = {
                 "thu",
                 "fri",
                 "sat",
                 "sun",
                 "mon",
                 "tue",
                 "wed"
};

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

    cout << day[x % 7] << endl;

    return 0;
}

C++: #include <iostream>
using namespace std;string w[7]={"thu","fri","sat","sun","mon","tue","wed"};
int main(){int i;cin>>i;cout<<w[i%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<cstdio>

int main() {
	int a;
		scanf("%d", &a);
	switch (a % 7) {
		case 0:
			printf("thu");
			break;
		case 1:
			printf("fri");
			break;
		case 2:
			printf("sat");
			break;
		case 3:
			printf("sun");
			break;
		case 4:
			printf("mon");
			break;
		case 5:
			printf("tue");
			break;
		case 6:
			printf("wed");
			break;
	}
		printf("\n");
	return 0;
}