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

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 << "\n";
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int a;
    scanf("%d",&a);
    if(a==2 ||a==9 || a==16 || a==23 || a==30) cout <<"sat"<< endl;
    if(a==1 || a==8 || a==15 || a==22 || a==29) cout <<"fri"<< endl;
    if(a==3 || a==10 || a==17 || a==24) cout <<"sun"<< endl;
    if(a==4 || a==11 || a==18 || a==25) cout <<"mon"<< endl;
    if(a==5 || a==12 || a==19 || a==26) cout <<"tue"<< endl;
    if(a==6 || a==13 || a==20 || a==27) cout <<"wed"<< endl;
    if(a==7 || a==14 || a==21 || a==28) cout <<"thu"<< endl;
    return 0;
}

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

int main(void){
  int n;
  cin >> n;
  cout << &"thu\0fri\0sat\0sun\0mon\0tue\0wed"[n%7*4] << endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a;
	cin >> a;
	switch (a % 7){
	case 0:
		cout << "thu";
		break;
	case 1:
		cout << "fri";
		break;
	case 2:
		cout << "sat";
		break;
	case 3:
		cout << "san";
		break;
	case 4:
		cout << "mon";
		break;
	case 5:
		cout << "thu";
		break;
	case 6:
		cout << "wed";
		break;
	}
	return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(void){
    
    int X;
    cin >> X;
    int amari = X % 7;
    
    
    switch(amari){
        
        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>
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<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 <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a,b;
    cin>>a;
    b =a%7;
    if(b==0){
        cout<<"thu"<<endl;
    }if(b==1){
        cout<<"fri"<<endl;
    }if(b==2){
        cout<<"sat"<<endl;
    }if(b==3){
        cout<<"sun"<<endl;
    }if(b==4){
        cout<<"mon"<<endl;
    }if(b==5){
        cout<<"tue"<<endl;
    }if(b==6){
        cout<<"wed"<<endl;
    }
    
}

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

int main() {
  string s[7]={"mon","tue","wed","thu","fri","sat","sun"};
  int k=5,x;
  cin >> x;
  if(x<9) for(int i=9; i>x; i--) k=(k+6)%7;
  else for(int i=9; i<x; i++) k=(k+1)%7;
  cout << s[k] << endl;
  return 0;
}

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

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

  return 0;
}

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

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