Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #include <iostream>
#include <string>
//#include <string.h>
using namespace std;
int main(){
	char alpha[] = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string str;
	while( 1 ){
		if( getline( cin, str ).eof() ) break;
		for( int a = 0; a < 26; a++ ){
			for( size_t i = 0; i < str.length(); i++ ){
				for( size_t j = 0; j < sizeof(alpha); j++ ){
					if( str[i] == alpha[j] ){
						str[i] = alpha[j - 1];
						break;
					}
				}
			}
		/*char word = strtok( str.c_str(), " " );
		if( word == "the" || word == "that" || word == "this" ) break;
		while( word == NULL ){
			word = strtok( NULL, ' ' );
			if( word == "the" || word == "that" || word == "this" ) goto end;
		}*/
			if( str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos ){
				break;
			}
		}
		cout << str << endl;
	}
}

C++: #include <cstdio>
#include <cstring>

int main(void)
{

	char str[100];
	gets(str);

	while(!strstr(str, "this") && !strstr(str, "the") && !strstr(str, "that"))
		for(int i = 0; i < strlen(str); i++){
			if(str[i] >= 'a' && str[i] <= 'a'+26)
				str[i] = 'a' + (str[i] - 'a' + 1) % 26;
		}

	printf("%s\n", str);


	return 0;
}

C++: #include<algorithm>
#include<cassert>
#include<climits>
#include<cmath>
#include<cstring>
#include<deque>
#include<functional>
#include<iomanip>
#include<iostream>
#include<map>
#include<queue>
#include<set>
#include<stack>
#include<unordered_map>
#include<unordered_set>
#include<utility>
#include<vector>

using namespace std;

using lint = long long;
using P = pair<int, int>;
using LLP = pair<long long, long long>;

#define REP(i, x, n) for(int i = (x), i##_len = int(n) ; i < i##_len ; ++i)
#define rep(i, n) for(int i = 0, i##_len = int(n) ; i < i##_len ; ++i)
#define reps(i, n) for(int i = 1, i##_len = int(n) ; i <= i##_len ; ++i)
#define rrep(i, n) for(int i = int(n) - 1 ; i >= 0 ; --i)
#define rreps(i, n) for(int i = int(n) ; i > 0 ; --i)
#define SORT(x) sort((x).begin(), (x).end())
#define SORT_INV(x) sort((x).rbegin(), (x).rend())
#define TWINS(x) cout << ((x) ? "Yay!" : ":(") << endl

constexpr int IINF = (1 << 30) - 1;
constexpr long long LLINF = 1LL << 61;
constexpr double EPS = 1e-8;

const int dx4[] = {1, 0, -1, 0}, dy4[] = {0, 1, 0, -1};
const int dx8[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy8[] = {0, -1, -1, -1, 0, 1, 1, 1};

template<typename T>
bool chmax(T &a, T b){
    if(a < b){
        a = b;
        return true;
    }
    return false;
}

template<typename T>
bool chmin(T &a, T b){
    if(b < a){
        a = b;
        return true;
    }
    return false;
}

void print(double x){
    int t = 0;
    if(x < 0.0){
        t = ceil(x);
    }else{
        t = floor(x);
    }
    cout << t << endl;
    return;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    string s;
    while(getline(cin, s)){
        vector< P > v;
        rep(i, s.size()){
            if('a' <= s[i] && s[i] <= 'z'){
                int j = i;
                while(j < i_len && 'a' <= s[j] && s[j] <= 'z'){
                    ++j;
                }
                if(3 <= j - i && j - i <= 4){
                    v.emplace_back(i, j - i);
                }
                i = j;
            }
        }

        string ans;
        for(auto p : v){
            int d = (('t' - 'a') - (s[p.first] - 'a') + 26) % 26;
            string t;
            REP(i, p.first, p.first + p.second){
                t.push_back((((s[i] - 'a') + d) % 26) + 'a');
            }
            if(t == "the" || t == "this" || t == "that"){
                rep(i, s.size()){
                    if('a' <= s[i] && s[i] <= 'z'){
                        ans.push_back((((s[i] - 'a') + d) % 26) + 'a');
                    }else{
                        ans.push_back(s[i]);
                    }
                }
                break;
            }
        }

        cout << ans << endl;
    }

    return 0;
}

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

using namespace std;

int main() {

	string crypted;
	string encrypted;
	
	int len = 0;
	
	while(getline(cin, crypted)){
		len = crypted.size();
		for(int j=0; j<26; j++){
			for(int i=0; i<len; i++){
				if(crypted[i] >= 'a' && crypted[i] <= 'z'){
					crypted[i] =  (crypted[i] - 97 + 1) % 26 + 97;
				}
			}
			if(crypted.find("the", 0) != string::npos || crypted.find("this", 0) != string::npos || crypted.find("that", 0) != string::npos){
				cout << crypted << endl;
			}
		}
	}

	return 0;
}

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;S[i]!='\0';i++){
            if('a'<=S[i] && S[i]<='y'){
                S[i]++;
            }else if(S[i]=='z'){
                S[i]='a';
            }
            
            if(i>=2 && (S[i+1]<'a' || 'z'<S[i+1])){
                if(S[i-2]=='t' && S[i-1]=='h' && S[i]=='e')
                    f=true;
            }
            if(i>=3 && (S[i+1]<'a' || 'z'<S[i+1])){
                if(S[i-3]=='t' && S[i-2]=='h')
                    if((S[i-1]=='i' && S[i-0]=='s') || (S[i-1]=='a' && S[i-0]=='t'))
                        f=true;
            }
        }
        
        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;
	while(getline(cin, str)){
		while(1){
			for(int i=0; i<(int)str.length(); i++){
				if('a' <= str[i] && str[i] <'z'){
					str[i]++;
				}else if(str[i]=='z'){
					str[i]='a';
				}
			}
			if(str.find("this")==string::npos && str.find("that")==string::npos && str.find("the")==string::npos){
				continue;
			}
			cout << str << endl;
			break;
		}
	}
	return 0;
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

string decode(string inp,int n){
    for(int i=0;i<inp.length();i++){
        if('a'<=inp[i]&&inp[i]<='z'){
            
            inp[i]=inp[i]-n;
            if(inp[i]<'a') inp[i]+=('z'-'b');
        }
    }
    return inp;
}


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