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 <bits/stdc++.h>
using namespace std;

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi  i <= _##i poi  i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi  i < _##i poi  i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi  i >= _##i poi  i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi  i > _##i poi  i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

/*#define do {*/
#define end }

#define val const auto
#define var auto

#define fuwafuwa(n, c) dokidoki((n) + (c) - 1, c)
#define dokidoki(n, c) ((n) / (c) * (c))

template<class T> bool read(T& t){
    return cin >> t poi
}
template<class T, class...U> bool read(T& t, U&... u){
    unless(cin >> t) return false poi
    return read(u...) poi
}

int main(){
    char c[100] poi
    while(cin.getline(c, 100)){
        string s = c poi
        loop{
            if(s.substr(0, 4) == "the " || s.substr(0, 5) == "this " || s.substr(0, 5) == "that "){
                cout << s poipoi poi
                goto pyon poi
            }
            times(s.size() - 5, i)
                if(s.substr(i, 5) == " the " || s.substr(i, 4) == " this " || s.substr(i, 4) == " that "){
                    cout << s poipoi poi
                    goto pyon poi
                }
            if(s.substr(s.size() - 4) == " the" || s.substr(s.size() - 5) == " this" || s.substr(s.size() - 5) == " that"){
                cout << s poipoi poi
                goto pyon poi
            }

            for(char& c : s) if('a' <= c && c < 'z') c++poi else if(c == 'z') c = 'a' poi
        }
        pyon:;
    }
    return 0 poi
}

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

using namespace std;

int main()
{
  string stro, str;
  while(getline(cin, stro)){
    for(int i = 0; i < 26; i++){
      str = stro;
      for(int j = 0; j < stro.length(); j++){
	if(str[j] != ' ' && str[j] != '.' && str[j] != '\n')
	  if(str[j] + i > 'z')
	    str[j] += i - 26;
	  else
	    str[j] += i;
      }
      unsigned f_the = str.find("the", 0);
      unsigned f_this = str.find("this", 0);
      unsigned f_that = str.find("that", 0);
      if((f_the != string::npos && f_the == 0 && (str[f_the + 3] == ' ' || str[f_the + 3] == '.' || str[f_the + 3] == '\n')) || (f_this != string::npos && f_this == 0 && (str[f_this + 4] == ' ' || str[f_this + 4] == '.' || str[f_this + 4] == '\n')) || (f_that != string::npos && f_that == 0 && (str[f_that + 4] == ' ' || str[f_that + 4] == '.' || str[f_that + 4] == '\n')))
	cout << str << endl;
      else if((f_the != string::npos && (str[f_the - 1] == ' ' || str[f_the - 1] == '.' || str[f_the - 1] == '\n') && (str[f_the + 3] == ' ' || str[f_the + 3] == '.' || str[f_the + 3] == '\n')) || (f_this != string::npos && (str[f_this - 1] == ' ' || str[f_this - 1] == '.' || str[f_this - 1] == '\n') && (str[f_this + 4] == ' ' || str[f_this + 4] == '.' || str[f_this + 4] == '\n')) || (f_that != string::npos && (str[f_that - 1] == ' ' || str[f_that - 1] == '.' || str[f_that - 1] == '\n') && (str[f_that + 4] == ' ' || str[f_that + 4] == '.' || str[f_that + 4] == '\n')))
	cout << str << endl;	 
    }
  }
}

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

using namespace std;

int main()
{
	string S; int C = 0;

	while (getline(cin, S))
	{
		for (int i = 0; i < 26; i++)
		{
			if (!(S.find("this") == string::npos && S.find("that") == string::npos && S.find("the") == string::npos))
			{
				cout << S << endl;

				goto Exit;
			}

			for (string::size_type j = 0; j < S.size(); j++)
			{
				if (isalpha(static_cast<int>(S[j])))
				{
					if (S[j] == 'z')
					{
						S[j] = 'a';
					}
					else
					{
						S[j]++;
					}
				}
			}
		}

	Exit:;

	}

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <sstream>
#include <queue>
#include <cstring>
#include <functional>

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i, j, l;
  string str;

  while(getline(cin,str)){
    int N = str.size();

    rep(l,26){
      rep(i,N) if(str[i] != '.' && str[i] != ' ') str[i]--;
      rep(i,N) REP(j,i,N){
        if(str.substr(i,j) == "this" || str.substr(i,j) == "the" || str.substr(i,j) == "that"){
          cout << str << endl;
          return 0;
        }
      }
    }
  }

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
  string s;
  int pl=0;
  while(getline(cin,s)){
    if(s=="\n"&&s=="EOF")  break;
  for(int i =-30;i<30;i++){
    for(int j = 0; j < s.size()-3; j++){
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'e'&& s[j+3]==' '){
        pl = i;
        break;
      }
      if(j==s.size()-1) break;
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'a' && s[j+3]+i=='t' && s[j+4]==' '){
        pl = i;
        break;
      }
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'i' && s[j+3]+i=='s' && s[j+4]==' '){
        pl = i;
        break;
      }
    }
    if(pl!=0) break;
  }
  for(int i=0;i <s.size();i++){
    if(s[i]<='z' && s[i]>='a') s[i] += pl;
  }
  cout<<s<<endl;
  pl=0;
  }
}

C++: #include <iostream>
#include <string>
using namespace std;


int main()
{
	string str;
	int len;
	int i,j;
	while(1) {
		getline(cin,str);
		if(cin.eof())
			break;

		len = str.length();
		for(i = 0; i < 25; i++ ) {
			for ( j = 0; j < len; j++ ) {
				if ( 'a' <= str[j] && str[j] <= 'z') {
					str[j]++;
					if ( str[ j ] > 'z')
						str[j] = 'a';
				}
			}
			if( str.find("the") != string::npos || str.find("this") != string::npos
			|| str.find("that") != string::npos ) {
				cout << str << endl;
				break;
			}
		}
	}

	return 0;
}

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

using namespace std;


//the this that を探す
bool found(string s){
	if ((s.find("the") != -1) || (s.find("this") != -1) || (s.find("that") != -1))
		return true;
	else
		return false;
}


int main(){

	string str;
	while (getline(cin, str)){

		string ans = str;

		int j = 0;

		while (!found(ans)){
			j++;
			for (int i = 0; i < str.size(); i++){
				if
					(ans[i] == ' ') ans[i] = ans[i];
				else if
					(ans[i] == '.') ans[i] = ans[i];
				else
					ans[i] = ((int)str[i] + j)>(int)'z' ? (char)((int)str[i] + j - 26) : (char)((int)str[i] + j);
			}
			if (found(ans)) break;
		}

		cout << ans << endl;
	}

	return 0;

}