Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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

string decrypt(string str1, int move) {
	string str2 = str1;
	for (int i = 0; i < str1.length(); i++) {
		if (str1[i] >= 'a' && str1[i] <= 'z') {
			str2[i] = (str1[i] - 'a' + move) % 26 + 'a';
		}
	}
	return str2;
}

int main(void) {
	string str1, str2;
	while (getline(cin, str1)) {
		for (int i = 0; i < 26; i++) {
			str2 = decrypt(str1, i);
			if (str2.find("this") != string::npos || 
				str2.find("that") != string::npos ||
				str2.find("the") != string::npos)
				break;
		}
		cout << str2 << endl;
	}
}

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

char buf[99];

int main(){
    int i;

    for(;~scanf("%[^\n] ",buf);){
        for(i=0; i<100; i++){
            if( buf[i]-buf[i+1] == 12 ){
                break;
            }
        }
        int sa = buf[i] - 't';
        for(i=0; buf[i]!='\0'; i++){
            buf[i]=!putchar( buf[i] - (97>buf[i] ? 0: sa) );
        }
        puts("");
    }
    return 0;
}

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

    char a[1000];
    while(scanf("%[^\n]",a) != EOF){
        getchar();
        bool flg = 0;
        for(int i = 1; i < 26; i++){
            unsigned char ans[1000] = {0};
            for(int j = 0; j < strlen(a); j++){
                if(a[j] == ' ' || a[j] == '.') ans[j] = a[j];
                else ans[j] = a[j] + i;
                if(ans[j] > 'z') ans[j] -= 26;
            }
            for(int j = 0; j < strlen(a); j++){
                if(ans[j] == 't' && ans[j+1] == 'h'){
                    if(ans[j+2] == 'e' && ans[j+3] == ' ' || ans[j+3] == 0 || ans[j+3] == '.')flg = 1;
                    if(ans[j+2] == 'i' && ans[j+3] == 's' && ans[j+4] == ' ' || ans[j+4] == 0 || ans[j+4] == '.')flg = 1;
                    if(ans[j+2] == 'a' && ans[j+3] == 't' && ans[j+4] == ' ' || ans[j+4] == 0 || ans[j+4] == '.')flg = 1;
                }
                if(flg){
                    if(j == 0){
                        cout << ans << endl;
                        goto end;
                    }
                    else{
                        if(ans[j-1] == ' '){
                            cout << ans << endl;
                            goto end;
                        }
                    }
                }
            }
        }
        end:;
        for(int i = 0;i < 1000; i++) a[i] = 0;
    }

    return 0;
}

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

int main(void)
{
	string str;
	while (getline(cin, str))
	{
		while (str.find("the") == -1 && str.find("this") == -1 && str.find("that") == -1)
		{
			for (int i = 0; i < str.size(); i++)
			{
				if ('a' <= str[i] && str[i] < 'z') str[i]++;
				else if (str[i] == 'z') str[i] = 'a';
			}
		}
		cout << str << endl;
	}
	return 0;
}

C++: #include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string henkan(string a)
{
	for (int i = 0; i < a.size(); i++)
	{
		if (a[i] != ' '&&a[i] != '.')
		{
			if (a[i] == 'z')a[i] = 'a';
			else 
				a[i] += 1;
		}
	}
	return a;
}
bool check(string a)
{
	string x[3] = { "the", "this", "that" };
	for (int i = 0; i < 3; i++)
	{
		if (a.find(x[i], 0) != string::npos)return false;
	}
	return true;
}
int main()
{
	
	string a, b;
	cin >> b;
	a.append(b);
	while (cin>>b)
	{
		a.append(" ");

		cin >> b;
		a.append(b);
	}
	while (check(a))
	{
		a = henkan(a);
	}
	cout << a << endl;
	
}

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

using namespace std;

int main()
{
    string s;

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

    return 0;
}

C++: #include <iostream> // C++の入出力
#include <stdio.h> // C の入出力
#include <algorithm> // sort などのアルゴリズム
#include <string.h> // C の文字列用
#include <ctype.h> // C の文字種用
#include <string> // C++の文字列
#include <math.h>
using namespace std;
int main(void){
    string in;
    string hyou="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
    string kkk=" .",sen="th",sen1="eisat";
    while(getline(cin,in)){
        for(int s=1;s<=26;s++){
            string out="";
            for(int i=0;i<in.length();i++){
                if(in[i]==kkk[0]||in[i]==kkk[1]){
                    out+=in[i];
                }
                for(int k=0;k<26;k++){
                    if(in[i]==hyou[k]){
                        out+=hyou[k+s];
                        break;
                    }
                }
            }
            bool sw=0;
            for(int i=0;i<out.length();i++){
                if(out[i]==sen[0]&&out[i+1]==sen[1]){
                    if(out[i+2]==sen1[0]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }else if(out[i+2]==sen1[1]&&out[i+3]==sen1[2]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }else if(out[i+2]==sen1[3]&&out[i+3]==sen1[4]){
                        sw=1;
                        cout<<out<<endl;
                        break;
                    }
                }
            }
            if(sw==1)break;
        }
    }
    return 0;
}

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

int main(){
	string str[1000];
	int k = 0;
	int zure[1000];
	bool flag[1000] = {false};
	while(getline(cin, str[k])){
		for(int j = 0; j < 26; j++){
			for(int i = 0; i < str[k].size()-2; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('e'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('i'+j-'a')%26 && str[k][i+3] == 'a'+('s'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 'a'+('t'+j-'a')%26 && str[k][i+1] == 'a'+('h'+j-'a')%26 && str[k][i+2] == 'a'+('a'+j-'a')%26 && str[k][i+3] == 'a'+('t'+j-'a')%26){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
		}
	}
	for(int j = 0; j < k; j++){
		for(int i = 0; i < str[j].size(); i++){
			if(str[j][i] >= 'a' && str[j][i] <= 'z'){
				str[j][i] = str[j][i]-zure[j];
				if(str[j][i] < 'a'){
					str[j][i] = str[j][i]+26;
				}
			}
		}
		cout << str[j] << endl;
	}
}