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<cstdio>
#include<cmath>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<algorithm>
#include<functional>
#include<deque>
#include<string.h>
#include<ctype.h>
#include<time.h>
#include<stdlib.h>
using namespace std;
 
char c[85];
 
bool search_th(){
  bool f = false;
  for (int i = 0; i < strlen(c); i++){
    if ((c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'e') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'i' && c[i+3] == 's') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'a' && c[i+3] == 't')){
          f = true;  break;
    }
  }
  return f;
}
 
int main(){
  while (cin.getline(c, sizeof(c))){
    while (1){
      if (search_th() == true){
        cout << c << endl;
        break;
      }
      for (int j = 0; j < strlen(c); j++){
        if (c[j] >= 'a' && c[j] <= 'y') c[j]++;
        else if (c[j] == 'z')                c[j] = 'a';
      }
    }
    for (int i = strlen(c); i < 85; i++){
      c[i] = '\0';
    }
  }
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <string>
#include <climits>
#include <iomanip>
#include <utility>

#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define PRINT(STR) cout << (STR) << endl
#define DEBUG(X) cerr << X << " (" << __LINE__ << ", " << __func__ << " )" << endl;

typedef long long ll;
using namespace std;

int main() {
	cin.tie(0); //?????±?????????????????????
	ios::sync_with_stdio(false); //printf??¨??±??????????????????
	string str;
	while (getline(cin, str)) {
		for (int i = -26; i <= 26; i++) {
			string newstr = str;
			for (int j = 0; j < str.size(); j++) {
				if ('a' <= newstr[j] && newstr[j] <= 'z') {
					newstr[j] = str[j] + i;
					if (newstr[j] < 'a') {
						newstr[j] -= 'a';
						newstr[j] += 123;
					} else if (newstr[j] > 'z') {
						newstr[j] -= 'z' + 1;
						newstr[j] += 'a';
					}
				}
			}
			//cerr << newstr << endl;
			if (newstr.find("the", 0) != string::npos ||
					newstr.find("this", 0) != string::npos ||
					newstr.find("that", 0) != string::npos) {
				cout << newstr << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    char str[81] = {'\0'};
    int i, j, k;
    bool check;
    char gar[5];

    while(gets(str)){
        check = true;
        while(check){
            i = k = 0;
            while(str[i] != '.'){
                if(str[i] != ' ')
                    str[i]++;
                if(str[i] == 'z' + 1){
                    str[i] = 'a';
                }
                i++;
            }
            while(str[k + 4]){
                if( (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'i' && str[k + 3] == 's') || (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'a' && str[k + 3] == 't') || (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'e'))
                    check = false;
                    break;
            }
                if(str[k] != ' ') k++;
            k++;
        }
    cout << str << endl;
    }
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	const string key[] = { "the", "this", "that" };
//	cut here before submit 
//	freopen("testcase.cc", "r", stdin);
	string str = "";
	
	while (getline (cin, str )){
		int len = str.length();
		int i,j;
		vector <bool> match (3, false);

		for (j = 0; j < 26; ++j){
			string curr = str;
			for (i = 0; i < len; ++i){
				if ( isalpha(str[i]) ){
					curr[i] = (str[i] - 'a' + j) % 26 + 'a';
				} // end if
			} // end for
//			cout << "curr: " << curr << endl;

			for (i = 0; i < 3; ++i){
				if ( curr.find(key[i]) != string::npos ){
					match[i] = true;
				} // end if
			} // end for
			if ((int)count(match.begin(), match.end(), true ) > 0){
				cout << curr << endl;
				break;
			} // end if
		} // end for
	} // end while
		
	return 0;
}

C++: #include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <map>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define PB push_back
#define MP make_pair
int main(){
  string s;
  while(getline(cin,s)){
    for(int i=0;i<26;i++){
      if(s.find("the")!=string::npos)break;
      if(s.find("that")!=string::npos)break;
      if(s.find("this")!=string::npos)break;
      for(int i=0;i<s.size();i++){
        if(!isalpha(s[i]))continue;
        s[i]++;
        if(s[i]>'z')s[i]-=26;
      }
    }
    cout<<s<<endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <ctype.h>
#include <algorithm>
using namespace std;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)
#define all(c) (c).begin(), (c).end()
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main() {
  string s; getline(cin, s);
  int slide = 0;
  rep(i, s.size()-4) {
    if(islower(s[i]) == 0) continue;
    rep(j, 26) {
      string sub;
      rep(k, 4) sub += (s[i+k]-'a'+j+52)%26 + 'a';
      if(sub.substr(0,3) == "the") slide = j;
      else if(sub == "this" || sub == "that") slide = j;
    }
    if(slide != 0) break;
  }
  rep(i, s.size()) {
    if(islower(s[i]) != 0)printf("%c", (s[i]-'a'+slide+52)%26 + 'a');
    else cout << s[i];
  }
  cout << endl;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <ctype.h>

using namespace std;

string slide(string s) {
  string r = s;
  for (int i = 0; i < r.length(); i++) {
    if (islower(r[i])) {
      if (r[i] == 'z') r[i] = 'a';
      else r[i] += 1;
    }
  }
  return r;
}

bool check_word(string s) {
  string dic[3] = {"this", "the", "that"};
  for (int i = 0; i < 3; i++)
    if (s.find(dic[i]) != string::npos) return true;
  return false;
}

int main() {
  string in, temp;
  bool found;
  while (1) {
    getline(cin, in);
    if (cin.eof()) break;
    for (temp = in, found = false; ; temp = slide(temp)) {
      found = check_word(temp);
      if (found) break;
    }
    cout << temp << endl;
  }
  return 0;
}