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 <iostream>
using namespace std;

int main(int argc, char *argv[]){
	string s;
    while(getline(cin,s)){
		int c=0;
		while((s.find("that") ==string::npos 
			  && s.find("the") ==string::npos
			  && s.find("this") ==string::npos) 
			 && c<26){
			for (int i = 0; i < s.length(); ++i){
				if(s[i]<'z' && s[i] >='a') s[i]++;
				if(s[i]=='z') s[i]='a';
			}
		    
			c++;
		}
		cout<<s<<endl;
	}
    return 0;
}

C++: #include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string henkan(string a)
{
	for (unsigned int i = 0; i < a.size(); i++)
	{
		if (a[i] != ' '&&a[i] != '.'&&a[i]!='\n')
		{
			if (a[i] == 'z')a[i] = 'a';
			else 
				a[i] += 1;
		}
	}
	return a;
}
bool check(string a)
{
	string x[3] = { "the", "this", "that" };
	for (int i = 0; i < 3; i++)
	{
		if (a.find(x[i], 0) != string::npos)return false;
	}
	return true;
}
int main()
{
	
	string a, b;
	cin >> b;
	a.append(b);
	while (getline(cin,b))
	{
		a.append(b);
		a.append("\n");
	}
	while (check(a))
	{
		a = henkan(a);
	}
	cout << a << endl;
	
}

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

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

			for (int j = 0; j < a.size(); j++){
				if (a[j] == ' '){
					continue;
				}
				else if (a[j] == 'z'){
					a[j] = 'a';
				}
				else if (a[j] == '.'){
					continue;
				}
				else {
					a[j]++;
				}
			}

		}

	}

	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
void slide(string& s) {
  for (auto& c : s)
    if (c == 'a') c = 'z';
    else if (c != '.' && c != ' ') c -= 1;
}
bool check(const string& s) {
  if (s.find("the") == string::npos || s.find("this") == string::npos
    || s.find("that") == string::npos) return true;
  return false;
}
int main() {
  string line;
  while (getline(cin, line)) {
    while (check(line))
      slide(line);
    cout << line << endl;
  }
}

C++: #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <map>
#define INF 100000000

using namespace std;
typedef long long ll;

string change(string s){
    int len=s.size();
    for(int i=0;i<len;i++){
        if('b'<=s[i] && s[i]<='z')s[i]--;
        if(s[i]=='a')s[i]='z';
    }
    return s;
}

bool check(string s){
    int len=s.size();
    string tan="";
    for(int i=0;i<len;i++){
        if('a'<=s[i] && s[i]<='z'){
            tan+=s[i];
        }
        else{
            if(tan=="the" || tan=="this" || tan=="that" )return true;
            tan="";
        }
    }
    return false;
}


int main(){
    string s;
    getline(cin,s);
    for(int i=0;i<26;i++){
        s=change(s);
        if(check(s)){cout<<s<<endl;return 0;}
    }
    
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <stdio.h>

using namespace std;

int pat[3][3];
int len[3];
int chr[3];
int zure;
int size;
bool atteru[3];
char text[100];

int main() {
	//cin >> text;
	gets(text);
	//int size = text.size();
	int pt = 0;
	size = 100;

	pat[0][0] = 't' - 'h';
	pat[0][1] = 'h' - 'e';
	pat[1][0] = 't' - 'h';
	pat[1][1] = 'h' - 'i';
	pat[1][2] = 'i' - 's';
	pat[2][0] = 't' - 'h';
	pat[2][1] = 'h' - 'a';
	pat[2][2] = 'a' - 't';
	chr[0] = 'e';
	chr[1] = 's';
	chr[2] = 't';
	len[0] = 3;
	len[1] = 4;
	len[2] = 4;

	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (pat[i][j] < 0) pat[i][j] += 26;
		}
	}

	zure = -1;

	int cnt = 0;
	atteru[0] = true;
	atteru[1] = true;
	atteru[2] = true;
	for (int i = 0; i < size-1 && zure == -1; i++) {
		if (text[i] == ' ') {
			cnt = 0;
			atteru[0] = true;
			atteru[1] = true;
			atteru[2] = true;
			//cout << "yarinaoshi!" << endl;
			continue;
		}
		if (text[i+1] == ' ' || cnt > 3) continue;
		int dist = text[i] - text[i+1];
		if (dist < 0) dist += 26;
		for (int j = 0; j <= 2; j++) {
			if (!atteru[j]) continue;
			if (cnt >= len[j]-1) continue;
			if (dist != pat[j][cnt]) {
				atteru[j] = false;
				//cout << j << " ha tigau!" << endl;
				continue;
			} else if (cnt == len[j]-2) {
				if (text[i+2] == ' ') {
					//cout << j << " ha atteta!" << endl;
					zure = text[i+1] - chr[j];
					if (zure < 0) zure += 26;
					//cout << "zure = " << zure << endl;
				} else {
					atteru[j] = false;
					continue;
				}
			}
		}
		cnt++;
	}

	for (int i = 0; i < size; i++) {
		if (text[i] == EOF) break;
		if (text[i] < 'a' || text[i] > 'z') continue;
		text[i] = text[i] - zure;
		if (text[i] < 'a') text[i] += 26;
	}

	cout << text << endl;

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include<iostream>
#include<string>
#include<sstream>
#include<vector>
using namespace std;
#define REP(i, j) for(int i = 0; i < j; i++)
#define FOR(i, j, k) for(int i = j; i < k; i++)
const int N = 26;

bool isOK(vector<string> v){
    REP(i, v.size()) if(v[i] == "the" || v[i] == "this" || v[i] == "that") return true;
    return false;
}

int main(){
    string str;
    while(getline(cin, str)){
        str = str.substr(0, str.size() - 1);
        REP(pls, N){
            string tmp;
            stringstream ss(str);
            vector<string> ans;
            while(ss >>tmp){
                REP(i, tmp.length()) tmp[i] = 'a' + ((tmp[i] - 'a'  + pls) % N);
                ans.push_back(tmp);
            }
            if(isOK(ans)){
                cout <<ans[0];
                FOR(i, 1, ans.size()) cout <<" " <<ans[i];
                cout <<'.' <<endl;
                break;
            }
        }
    }
    return 0;
}