Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

C++: #include<iostream>
#include<string.h>
#include<stdio.h>

int main(){
	char s[100];

	int count = 0;

	gets(s);

	int diff;
	int flag = false;
	//一番最初に｛the,that,this｝がある場合
	diff = s[0] - 't';
	if ((s[1] - diff) == 'h'){
		//printf("%c\n", s[j+1] - diff);
		if ((s[2] - diff) == 'e'){
			//printf("%c\n", s[j + 2] - diff);
			if (s[3] == ' '){
				flag = true;
			}
		}
		else if ((s[2] - diff) == 'a'){
			//printf("%c\n", s[j + 2] - diff);
			if ((s[3] - diff) == 't'){
				//printf("%c\n", s[j + 3] - diff);
				if (s[4] == ' '){
					flag = true;
				}
			}
		}
		else if ((s[2] - diff) == 'i'){
			//printf("%c\n", s[j + 2] - diff);
			if ((s[3] - diff) == 's'){
				//printf("%c\n", s[j + 3] - diff);
				if (s[4] == ' '){
					flag = true;
				}
			}
		}
	}
	
	if (!flag){
		//一番以降に｛the,that,this｝がある場合
		for (int j = 1; j < strlen(s); j++){
			if ((s[j]) == ' '){
				diff = s[j + 1] - 't';
				if ((s[j + 1] - diff) == 't'){
					//printf("diff:%d\n", diff);
					if ((s[j + 2] - diff) == 'h'){
						//printf("%c\n", s[j+1] - diff);
						if ((s[j + 3] - diff) == 'e'){
							//printf("%c\n", s[j + 2] - diff);
							if (s[j + 4] == ' '){
								break;
							}
						}
						else if ((s[j + 3] - diff) == 'a'){
							//printf("%c\n", s[j + 2] - diff);
							if ((s[j + 4] - diff) == 't'){
								//printf("%c\n", s[j + 3] - diff);
								if (s[j + 5] == ' '){
									break;
								}
							}
						}
						else if ((s[j + 3] - diff) == 'i'){
							//printf("%c\n", s[j + 2] - diff);
							if ((s[j + 4] - diff) == 's'){
								//printf("%c\n", s[j + 3] - diff);
								if (s[j + 5] == ' '){
									break;
								}
							}
						}

					}
				}
			}
		}
	}
	//printf("diff:%d\n",diff);
	for (int i = 0;i < strlen(s);i++){
		if (s[i] == ' ' || s[i] == '.')continue;
		s[i] -= diff;
	}

	printf("%s",s);

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>
#include <vector>

using namespace std;


int main(){

	string line;

	while(getline(cin, line)){

		string str[80], ans[80];
		int count = 0;
		int flag = 0;
		int slide;

		string temp;
		for(int i=0 ; i<line.size()-1 ; i++){
			temp += line[i];
		}
		line = temp;

		//???????????????????????¨???????´?
		for(int i=0 ; i<line.size() ; i++){
			if(line[i] == ' '){
				count++;
			}else{
				str[count] += line[i];
				ans[count] = str[count];
			}
		}
		count++;


		for(int i=1 ; i<=26 ; i++){
			for(int j=0 ; j<count ; j++){
				for(int k=0 ; k<str[j].size() ; k++){
					if(str[j][k] != '.'){
						str[j][k]++;
						if(str[j][k] > 'z'){
							str[j][k] = str[j][k] - 'z' + 'a' -1;
						}
					}
				}

				if(str[j] == "this" || str[j] == "the" || str[j] == "that"
						|| str[j] == "this." || str[j] == "the." ||str[j] == "that."){
					flag = 1;
					slide = i;
					break;
				}
			}
			if(flag == 1)break;
		}

		for(int i=0 ; i<count ; i++){
			for(int j=0 ; j<ans[i].size() ; j++){
				if(ans[i][j] != '.'){
					if((ans[i][j] + slide) > 'z' ){
						ans[i][j] = ans[i][j] - 'z' + 'a' + slide -1;
					}else{
						ans[i][j] = ans[i][j] + slide ;
					}
				}
			}
		}

		for(int i=0 ; i<count ; i++){
			cout << ans[i] << ' ';
		}
		cout << ans[count] << endl;

	}
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    string s;
    int i, j;

    while( getline(cin, s) ){
        while(s.find("the") == s.npos && s.find("this") == s.npos && s.find("that") == s.npos){
            for(i = 0; s[i]; i++){
                if(s[i] >= 'a' && s[i] <= 'z')
                    s[i]++;
                if(s[i] == 'z' + 1){
                    s[i] = 'a';
                }
            }
        }
        cout << s << endl;
    }
}

C++: #include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>

#include<cmath>
#include<iostream>
#include<fstream>

#include<string>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<sstream>
#include<stack>

using namespace std;

int main()
{
   int n,i,j,k,l,ck=0;
   while(scanf("%d",&n)!=EOF){
    ck=0;
    for(i=0; i<10; i++){
        for(j=0; i<10; j++){
            for(k=0; k<10; k++){
                for(l=0; l<10; l++){
                    if((i+j+k+l)==n)
                        ck++;
                }
            }
        }
    }
    cout<<ck<<endl;
   }
}

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

int main() {
	int i, j;
	string news;
	while (getline(cin, news)){
		for (i = 0; i <= 25; i++) {
			for (j = 0; j < news.size(); j++){
				if (news[j]>'a' && news[j] <= 'z')news[j] -= 1;
				else if (news[j] == 'a') news[j] = 'z';
			}
			for (j = 0; j < news.size() - 4; j++) {
				if ((news[j] == 't'&&news[j + 1] == 'h') && (news[j + 2] == 'e' || (news[j + 2] == 'i'&&news[j + 3] == 's') || (news[j + 2] == 'a'&&news[j + 3] == 't'))) {
					goto end;
				}
			}
		}
	end:
		cout << news << endl;
	}
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int main(){

	string sstr;
	while(1){
		getline(cin,sstr);
		if(cin.eof())
			break;

		string retStr;
		for(int i = 0; i < 26; i++){
			string str=sstr;
			if(i==4){
			//	cout<<endl;
			}
			for(int j = 0; j < str.size(); j++){
				if(str[j] >= 'a' && str[j] <= 'z'){
					str[j] = str[j] - i;
					if(str[j] < 'a'){
						str[j]+=26;
					}
				}
			}
			bool f=false;
			for(int j = 0; j + 2 < str.size(); j++){
				if(str.substr(j,3)=="the"){
					f=true;
					break;
				}
				else if(j+3<str.size()&& str.substr(j,4)=="this"){
					f=true;
					break;
				}
				else if(j+3<str.size()&&str.substr(j,4)=="that"){
					f=true;
					break;
				}
			}
			if(f){
				retStr=str;
				break;
			}
		}

		cout<<retStr<<endl;
	}

	return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

char sub(char ch){
	if(ch=='a')return 'z';
	else return ch-1;
}


bool solve(string s){
	string tmp="";
	rep(i,s.size()){
		if(isalpha(s[i])){
			tmp+=s[i];
		}
		else{

			if( tmp=="the" || tmp=="this" || tmp=="that" )return true;

			tmp="";
		}
	}
	return false;
}

int main(){
	string s;
	while(getline(cin,s)){
		while(1){
			rep(i,s.size()){
				if(isalpha(s[i]))s[i]=sub(s[i]);
			}
			if(solve(s))break;
		}
		cout<<s<<endl;
	}
}