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>
#include <cstdio>
using namespace std;

int main(void){
    string str;
    
    while(getline(cin,str)){
  
        for(int i = 0 ; i < str.size() ; i++){
            if('a' <= str[i] && str[i] <= 'z') cout << (char)('a'+(str[i]-'a'+26-4)%26);
            else cout << str[i];
        }
        puts("");
    }
    
    return 0;
}

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

struct words {
	char str[82] ;
} w[82] ;

int p ;
int key ;
char c ;

bool isalpha ( char s ) ;

int main ( )
{
	p = 0 ;
	key = 9999 ;
	while ( scanf ( "%s" , w[p].str ) == 1 ) {
		c = getchar ( ) ;
		if ( strlen ( w[p].str ) == 4 && key == 9999 ) {
			if ( w[p].str[0] - w[p].str[1] == 't' - 'h' && w[p].str[1] - w[p].str[2] == 'h' - 'i' && w[p].str[2] - w[p].str[3] == 'i' - 's' ) {
				key = 't' - w[p].str[0] ;
			}
			else if ( w[p].str[0] - w[p].str[1] == 't' - 'h' && w[p].str[1] - w[p].str[2] == 'h' - 'a' && w[p].str[2] - w[p].str[3] == 'a' - 't' ) {
				key = 't' - w[p].str[0] ;
			}
		}
		else if ( strlen ( w[p].str ) == 3 && key == 9999 ) {
			if ( w[p].str[0] - w[p].str[1] == 't' - 'h' && w[p].str[1] - w[p].str[2] == 'h' - 'e' ) {
				key = 't' - w[p].str[0] ;
			}
		}
		p++ ;
		if ( c == '\n' ) {
			for ( int i = 0 ; i < p ; i++ ) {
				for ( int j = 0 ; w[i].str[j] ; j++ ) {
					if ( isalpha ( w[i].str[j] ) ) {
						w[i].str[j] += key ;
						if ( w[i].str[j] > 'z' ) {
							w[i].str[j] -= 26 ;
						}
						else if ( w[i].str[j] < 'a' ) {
							w[i].str[j] += 26 ;
						}
					}
				}
				if ( i != 0 ) {
					printf ( " " ) ;
				}
				printf ( "%s" , w[i].str ) ;
			}
			printf ( "\n" ) ;
			p = 0 ;
			key = 9999 ;
		}
	}
	return 0 ;
}

bool isalpha ( char s )
{
	return ( s >= 'a' && s <= 'z' ) ;
}

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

using namespace std;

int main() {
    string input;
    const int alph_lim = 26;

    while (getline(cin, input, '\n')) {
        for (int i = 0; i < alph_lim; i++) {
            for (int j = 0; j < input.size(); j++){
                if(islower(input[j])) {
                    input[j]++;
                    if (input[j] > 'z') {
                        input[j] -= alph_lim;
                    }
                }
            }

            if (input.find("this") != string::npos
                || input.find("that") != string::npos
                || input.find("ths") != string::npos) {

                cout << input << endl;
                break;
            }
        }
    }
    return 0;
}

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

int main ()
{
    int i;
    char str[1000];
    fgets(str, 1000, stdin);

    for (i = 0; i < strlen (str); i++){
        if (str[i] >= 'a' && str[i] <= 'z'){
            str[i] = str[i] - 4;
        }
    }
    printf("%s\n", str);
    return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){

    string s[] = {"the","this","that"};
    string in;
    while(true){
	getline(cin,in);
	if(cin.eof()) break;
	bool f = false;
	int d = 1;
	REP(i,30){

	    f = true;
	    REP(i,in.size()){
		if(in[i] == '.' || in[i] == ' ') continue;
		in[i]= (char)( 'a' + ( (int)(in[i] - 'a') + d) % 28);
	    }
	    vector<bool> flgs(3,false);
	    for(int i=0;i<in.size();i++){
		REP(j,3){
		    if(in.substr(i,s[j].size()) == s[j]) flgs[j] = true;
		}
	    }
	    if(flgs[0] || flgs[1] || flgs[2]) break;
	}
	cout << in << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
  string str;
  while(getline(cin,str)){
    while(str.find("the")==-1&&
	  str.find("this")==-1&&
	  str.find("that")==-1){
      int i;
      for(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<iostream>
#include<string>
using namespace std;
main(){
	string str;
	int tmp,b;
	while(getline(cin,str)){
		tmp='t'-str[0];
		for(int i=0;i<str.size();++i){
			if(str[i]>='a' && str[i]<='z'){
				if(str[i]>='m')str[i]-=26;
				str[i]+=tmp;
				if(str[i]<'a')str[i]+=26;
				else if(str[i]>'z')str[i]-=26;
			}
		}
		/*string str2="";
		for(int i=0;i<=4;++i){
			if(str[i]>='a' && str[i]<='z')str2+=str[i];
			else break;
		}*/
		//if(str2=="this" || str2=="the" || str2=="that")
		cout<<str<<endl;
	}
}

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

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


#define X real()
#define Y imag()
typedef complex<double> P;

const double EPS = 0.1;

int main(){
	
	while(1){
		string a;
		getline(cin,a);
		
		if(cin.eof())break;
		
		rep(i,26){
			string s;
			rep(j,a.size()){
				if(a[j]<'a' || a[j]>'z')s+=a[j];
				else s+=(a[j]-'a'+i)%26+'a';
			}
			if(s.find("this")!=-1 || s.find("the")!=-1 || s.find("that")!=-1){
				cout<<s<<endl;
				goto A;
			}
		}
		A:;
	}
}

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

using namespace std;

bool isPlain(string secret){
    bool find_the,find_that,find_this;
    
    find_the = (secret.find("the") != string::npos);
    find_that = (secret.find("that") != string::npos);
    find_this = (secret.find("this") != string::npos);

    return (find_the || find_that || find_this);
}

string decipher(string secret){
    int gap = 1;
    string plain;
    bool check;
    
    //"the", "that", "this"
    check = isPlain(secret);
    
    if(check){
        plain = secret;
    }
    else {
        while(gap<=26){
            string::iterator it = secret.begin();
            for (; it != secret.end(); it += 1){
                if('a'<=*it & *it <='z')
                    *it = (*it!='z') ? *it + 1 : 'a';
                //cout << *it;
            }
            //cout << endl;
            gap++;
            if(isPlain(secret)) break;
        }
    }
    return secret;
}


int main (int argc, char const* argv[]){
    string secret, plain;
    
    //暗号文の取得
    getline(cin,secret);
    
    
    //暗号解読
    plain = decipher(secret);
    
    //平文の出力
    cout << plain << endl;
    
    return 0;
}