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 <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;
}

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

using namespace std;

int main()
{
	string str;
	
	while (getline(std::cin, str), !str.empty()){
		int j = 0;
		int di = 0;
		for (int i = 0; i < str.size(); i++){
			if (str[i] == ' '){
				if (i - j < 5 && i - j > 1){
					if (str[j] - str[j + 1] == 12){
						if (str[j + 1] - str[j + 2] == 3){
							di = str[j] - 't';
							break;
						}
						else if (str[j + 1] - str[j + 2] == -1){
							if (str[j + 2] - str[j + 3] == -10){
								di = str[j] - 't';
								break;
							}
						}
						else if (str[j + 1] - str[j + 2] == 7){
							if (str[j + 2] - str[j + 3] == -19){
								di = str[j] - 't';
								break;
							}
						}
					}
					
				j = i + 1;
				}
			}
		}
		
		for (int i = 0; i < str.size();i++){
			if ('a' <= str[i] && str[i] <= 'z'){		
				str[i] = str[i] - di;
			}
		}
		
		cout << str << endl;
	}
}

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

int main() {
  char s[100];
  while (fgets(s, sizeof(s), stdin)) {
    while (1) {
      for (int i = 0; s[i] != '\0'; i++) {
        if (s[i] >= 'a' && s[i] < 'z') s[i]++;
        else if (s[i] == 'z') s[i] = 'a';
        else if (s[i] == '\n') s[i] = '\0';
      }
      if (strstr(s, "the") || strstr(s, "this") || strstr(s, "that")) break;
    }
    puts(s);
  }
}

C++: #include <set>
#include <map>
#include <list>
#include <queue>
#include <stack>
#include <cmath>
#include <ctype.h>
#include <ctime>
#include <cstdio>
#include <vector>
#include <string>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <utility>
#include <numeric>
#include <complex>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <cassert>
#include <iostream>
#include <iterator>
#include <algorithm>

using namespace std;

#define REP(i, x, n) for(int i = x; i < n; i++)
#define rep(i, n) REP(i, 0, n)
#define lengthof(x) (sizeof(x) / sizeof(*(x)))
#define FILL(ptr, value) FILL_((ptr), sizeof(ptr)/sizeof(value), (value))
template <typename T>
void FILL_(void * ptr, size_t size, T value){
  std::fill((T*)ptr, (T*)ptr+size, value);
}
//4方向ベクトル→↑←↓
int dx[] ={1,0,-1,0};
int dy[] ={0,-1,0,1};

int main()
{
  string str;
  while(getline(cin,str)){
    for(int i = 0;i < 26;i++){
      for(int i = 0;i <str.size();i++){
	if(isalpha(str[i]))
	  str[i] = (str[i]=='z')? 'a' : str[i] + 1;
      }
    if(str.find("the") !=string::npos||str.find("that") !=string::npos||
       str.find("this") !=string::npos){
      cout <<str<<endl;
      break;
    }
  }
  }


  return 0;
}