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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }


int main()
{
	string str;
	getline(cin, str);

	rep(i, 26)
	{
		rep(j, str.size())
			if(str[j] != ' ' && str[j] != '.')
				str[j] = (++str[j] > 'z' ? 'a' : str[j]);
		
		if(str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos)
		{
			cout << str << endl;
			break;
		}
	}
}

C++: #include<iostream>
#include<cstring>
#include<sstream>
using namespace std;
/*
string text = "hello world";
stringstream ss(text);
string t;
while (ss >> t){
*/
void fin(string a)
{
	cout << a << endl;
	return;
}
int main()
{
	string a,b;
	bool fir=false;
	while (cin >> b)
	{
		if(fir)a.append(" ");
		a.append(b);
		fir = true;
	}
	cout << a;
	while (1)
	{
		if (a.find("the", 0) != string::npos)
		{
			fin(a); return 0;
		}
		if (a.find("this", 0) != string::npos)
		{
			fin(a); return 0;
		}
		if (a.find("that", 0) != string::npos)
		{
			fin(a); return 0;
		}
		for (int i = 0; i < a.size()-1; i++)
		{
			if (a[i] != ' ')a[i] += 1;
			if (a[i]>'z')a[i] = 'a';
		}
	}
	

}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	string s;
	while(getline(cin,s)){
		for(int i=1;i<26;++i){
			for(int j=0;j<s.size();++j) if('a'<=s[j]&&s[j]<='z') s[j]=((s[j]-'a'+1)%26+'a');
			if(s.find("the")!=-1||s.find("this")!=-1||s.find("that")!=-1)break;
		}
		cout<<s<<endl;
	}
	return 0;
}

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

int main(){
	std::string s;
	while (std::getline(std::cin, s)){
		for (int i = 0; i < 26; ++i){
			if (s.find("this") == std::string::npos && s.find("the") == std::string::npos && s.find("that") == std::string::npos){
				for (int j = 0; j < s.size(); ++j){
					if (s[j] != ' '&&s[j] != '.'){
						if (s[j] == 'z')s[j] = 'a';
						else s[j] += 1;
					}
				}
			}
			else{
				std::cout << s << std::endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
 
using namespace std;
 
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
 
int main() {
    string s;
    string ans;
    bool flag = false;
    int key = 1;
    while(getline(cin, s)){
    	while(s != "the" && s != "that" && s != "this") {
	    	rep(i, s.size()) {
	            if(97 <= s[i] && s[i] <= 122) {
	                int number = (s[i] - 'a' + key) % 26;
	                s[i] = 'a' + number;
	            }
	        }
	    }
	    cout << ans << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (s == "") break;
        while (s.find("the") != string::npos && s.find("this") != string::npos && s.find("that") && string::npos) f(s);
        cout << s << endl;
    }
}

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

using namespace std;

int main(int argc, char **argv)
{
	char a[82], t;
	int n, p;
	
	while(gets(a)!=NULL){
		n = strlen(a);
		for(int i = 0; i < n; i++){
			p = (int)(a[i++]-'t');
			if(a[i] == ' '){
				continue;
			}
			t = a[i++]-p;
			if(t < 'a'){
				t += 25;
			} else if(t > 'z'){
				t -= 25;
			}
			if(a[i] == ' '){
				continue;
			}
			if(t == 'h'){
				t = a[i++]-p;
				if(t < 'a'){
					t += 25;
				} else if(t > 'z'){
					t -= 25;
				}
				if(t == 'e' && a[i] == ' '){
					break;
				} else if(t == 'i'){
					t = a[i++]-p;
					if(t < 'a'){
						t += 25;
					} else if(t > 'z'){
						t -= 25;
					}
					if(t == 's' && a[i] == ' '){
						break;
					}
				} else if(t == 'a'){
					t = a[i++]-p;
					if(t < 'a'){
						t += 25;
					} else if(t > 'z'){
						t -= 25;
					}
					if(t == 't' && a[i] == ' '){
						break;
					}
				}
			}
		}
		
		for(int i = 0; i < n; i++){
			if(a[i] == ' ' || a[i] == '.' || a[i] == ','){
				printf("%c",a[i]);
			} else {
				t = a[i]-p;
				if(t < 'a'){
					t += 25;
				} else if(t > 'z'){
					t -= 25;
				}
				printf("%c",t);
			}
		}
		cout << endl;
	}
	
	return 0;
}

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

using namespace std;

void Shift(string *str, int shift, int vec) {
  for (int str_i = 0; str_i < str->size(); str_i++)
    if (!isspace((*str)[str_i]) && (*str)[str_i] != '.')
      (*str)[str_i] += vec * shift;
}

bool FindTarget(string str) {
  if (str.find("the") != string::npos ||
      str.find("this") != string::npos ||
      str.find("that") != string::npos)
    return true;
  else
    return false;
}

int main() { 
  string input_str;

  int shift = 1;
  while (getline(cin, input_str)) {
    Shift(&input_str, shift, 1);
    if (FindTarget(input_str))
      break;
    Shift(&input_str, shift, -1);
    Shift(&input_str, shift, -1);
    if (FindTarget(input_str))
      break;
    Shift(&input_str, shift, 1);
    shift++;
  }

  cout << input_str << endl;

  return 0;
}

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

bool IncludeKeyWords(const string& Sentence)
{
	if(Sentence.find("the")  <=80) return true;
	if(Sentence.find("this") <=80) return true;
	if(Sentence.find("that") <=80) return true;
	return false;
}

void OneShift(string& Sentence)
{
	for(int i = 0; i < Sentence.size(); i++){
		if(97 < Sentence[i] && Sentence[i] < 123){
			Sentence[i] --;
		}else if(Sentence[i] == 97){
			Sentence[i] = 123;
		}
	}
}

int main()
{
	while(true){
		string Sentence;
		getline(cin, Sentence);
		if(cin.eof() == true) break;
		while(IncludeKeyWords(Sentence) == false){
			OneShift(Sentence);
		}
		cout << Sentence << endl;
	}
	return 0;
}