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<iostream>
#include<string>
using namespace std;
string S; char T[29] = "abcdefghijklmnopqrstuwxyz. "; int x[100000];
int main() {
	getline(cin, S);
	for (int i = 0; i < 100000; i++) { x[i] = 100000; }
	for (int i = 0; i < S.size(); i++) {
		for (int j = 0; j < 28; j++) {
			if (T[j] == S[i]) {
				x[i] = j;
			}
		}
	}
	for (int i = 0; i < 26; i++) {
		for (int i = 0; i < S.size(); i++) {
			if (x[i] == 19 && x[i + 1] == 7 && x[i + 2] == 8 && x[i + 3] == 18) {
				goto E;
			}
			if (x[i] == 19 && x[i + 1] == 7 && x[i + 2] == 0 && x[i + 3] == 18) {
				goto E;
			}
			if (x[i] == 19 && x[i + 1] == 7 && x[i + 2] == 4) {
				goto E;
			}
		}
		for (int i = 0; i < S.size(); i++) {
			if (x[i] < 26) {
				x[i]++;
				x[i] %= 26;
			}
		}
	}
E:;
	for (int i = 0; i < S.size(); i++) {
		cout << T[x[i]];
	}
	cout << endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>

using namespace std;
typedef long long ll;

int main(){
    int in;
    char S[1000];
    
    for(int i=0;;i++){
        
        in = getchar();
        
        if(in==EOF){
            S[i]='\0';
            break;
        }else{
            S[i]=(char)in;
        }
    }
    
    for(int k=0;;k++){
        
        bool f = false;
        
        for(int i=0;;i++){
            if('a'<=S[i] && S[i]<='y'){
                S[i]++;
            }else if(S[i]=='z'){
                S[i]='a';
            }
            
            if(i>=3){ // && !('a'<=S[i] && S[i]<='z')){
                if(S[i-3]=='t' && S[i-2]=='h' && S[i-1]=='e')
                    f=true;
            }
            if(i>=4){ // && !('a'<=S[i] && S[i]<='z')){
                if(S[i-4]=='t' && S[i-3]=='h')
                    if((S[i-2]=='i' && S[i-1]=='s') || (S[i-2]=='h' && S[i-1]=='t'))
                        f=true;
            }
            
            if(S[i]=='\0') break;
        }
        
        if(f) break;
    }
    
    for(int i=0;S[i]!='\0';i++)
        printf("%c",S[i]);
    
    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str, the = " the", dis = " this", that = " that";
	int zure, count = 0, i = 0;
	string judge = " ";
	bool bo = false;
	getline(cin, str);
	for (int k = 0; k < 26; k++) {
		for (int j = 0; j < str.size(); j++) {
			zure = str[i] - 't';
			if (str[j] != ' ') {
				judge += str[j] - zure;
			}
			if (str[j] == ' ' || j == str.size() - 1) {
				if (judge == " the" || judge == " this" || judge == " that") {
					bo = true;
					break;
				}
				else {
					i = j+1 ;
					judge = " ";
				}
			}
		}
		if (bo == true) {
			break;
		}
	}
	for (int i = 0; i < str.size(); i++) {
		if (str[i] >= 'a'+abs(zure) && str[i] <= 'z' - abs(zure)) {
			str[i] -= zure;
		}
		else if ((str[i]-abs(zure) < 'a' || str[i]+abs(zure) > 'z') && str[i]!=' ' && str[i]!='.') {
			if (str[i] + zure > 'z') {
				str[i] -= zure; 
			}
			else if (str[i] - zure > 'z') {
				str[i] -= 26 + zure;
			}
			else if (zure < 0) {
				str[i] -= zure;
			}
			else {
				str[i] += 26 - zure;
			}
		}
		cout << str[i];
	}
	cout << endl;
	return 0;
}

C++: 
#include<string>

using namespace std;


int main(){

  string s, strc;

  while(getline(cin,s)){

    for(int j=0;j<26;j++){
      

      if(s.find("the")!=string::npos ||s.find("this")!=string::npos||s.find("that")!=string::npos ){
	cout << s << endl;
      }
      for(int i=0;i<s.size();i++){//size()ツづ債閉カツ篠堋療アツづ個陳キツつウツづーツ陛板つキ
	
	if(s[i]=='z')s[i]='a';
	else if(s[i]>='a'&&s[i]<='z')s[i]++;
      }

    }

  }
  

  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a[53]="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
int main(){
    char str[81];
    while(cin>>str[0]){
        for(int i=1;i<81;i++)str[i]=0;
        for(int i=1;i<80;i++){
            str[i]=getchar();
            if(str[i]==10){
                str[i]=0;
                break;
            }
        }
        int len=strlen(str);

        for(int i=0;i<26;i++){
            char cpy[81];
            strncpy(cpy,str,81);

            for(int j=0;j<len;j++){
                if(str[j]==' ' || str[j]=='.' || str[j]==10)continue;
                cpy[j]=a[cpy[j]-'a'+i];
            }
            bool f=false;
            for(int j=0;j<len-2;j++){
                if(!strncmp(cpy+j,"the",3))f=true;
                if(!strncmp(cpy+j,"this",4))f=true;
                if(!strncmp(cpy+j,"that",4))f=true;
            }
            if(f){
                cout<<cpy<<endl;
                break;
            }
        }
    }
    return 0;


}

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

const char *table = "abcdefghijklmnopqrstuvwxyz";

inline char shift(char c, int n)
{
    return table[(c - 'a' - n) % 26];
}

void shift(std::string &s, int n)
{
    for (unsigned i = 0; i < s.size(); ++i) {
        if (s[i] != ' ' && s[i] != '.') s[i] = shift(s[i], n);
    }
}

int search_number(const std::string &s)
{
    for (unsigned i = 0; i < s.size() - 3; ++i) {
        int n = s[i] - 't';
        if (shift(s[i + 1], n) == 'h') {
            if (shift(s[i + 2], n) == 'e'
                    || (i < s.size() - 3 && shift(s[i + 2], n) == 'i' && shift(s[i + 3], n) == 's')
                    || (i < s.size() - 3 && shift(s[i + 2], n) == 'a' && shift(s[i + 3], n) == 't'))
                return n;
        }
    }
    return s[s.size() - 3] - 't';
}

int main()
{
    std::string s;
    while (getline(std::cin, s)) {
        shift(s, search_number(s));
        std::cout << s << std::endl;
    }
}

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

using namespace std;
int main(){
	string str1;
	int i, j, n = 0;
	while(getline(cin, str1)){
		bool change = false;
		for(i = 0;i < 26;i++){
			for(j = 0;j < str1.size();j++){
				if(str1[j] != ' ' && str1[j] != '.'){
					str1[j] -= 1;
				}
			}
			for(j = 0;j+3 < str1.size();j++){
				if(str1[j] == 't' && str1[j+1] == 'h'){
					if(str1[j+2] == 'e' || (str1[j+2] == 'i' && str1[j+3] == 's') || (str1[j+2] == 'a' && str1[j+3] == 't')){
						n = i + 1;
						change = true;
						break;
					}
				}
			}
			if(change) break;
		}	
		for(i = 0;i < str1.size();i++){
			cout << str1[i];
		}
		cout << endl;
	}


	return 0;
}