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 <string>

using namespace std;

string line;
int str_len;

bool is_finish() {
  for(int i=0; i<str_len-2; i++) {
    if(line[i] == 't') {
      if(line[i+1] == 'h') {
        if(line[i+2] == 'e') { return true; }
        else if(line[i+2] == 'i' && line[i+3] == 's') { return true; }
        else if(line[i+2] == 'a' && line[i+3] == 't') { return true; }
      }
    }
  }
  return false;
};


int main() {
  getline(cin, line);
  str_len = line.length();
  
  for(int j=0; j<26; j++) {
    if(is_finish()) { 
      cout << line << endl;
      break; 
    }

    for(int j=0; j<str_len; j++) {
      if('a' <= line[j] && line[j] < 'z') {
        line[j] += 1;
      }
      else if(line[j] == 'z') {
        line[j] = 'a';
      }
    }
  }
  return 0;
}

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

bool IsValid(const std::string& Text)
{
    return 
        Text.find("the")  != std::string::npos ||
        Text.find("this") != std::string::npos ||
        Text.find("that") != std::string::npos;
}
std::string RotateChar(const std::string& Code, int Key)
{
    std::string Text = Code;
    for(std::size_t i = 0; i < Text.size(); ++i){
        if(Text[i] == ','
        || Text[i] == '.'
        || Text[i] == ' '){
            continue;
        }
        int c = Text[i] + Key;
        if(c < 'a') c += 26;
        if(c > 'z') c -= 26;
        Text[i] = c;
    }
    return Text;
}
std::string Decrypt(const std::string& Code)
{
    for(int i = 0; i < 26; ++i){
        std::string Text = RotateChar(Code, i);
        if(IsValid(Text)){
            return Text;
        }
    }

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

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

C++: #include<stdio.h>
#include<string.h>

int main(void){
	
	char ango[1000],ttt[100];
	int leng,b;

	while(gets(ango)!=0){
		leng=strlen(ango);
		b=1;

		while(b){

			for(int i=leng-1;i>=0;i--){
				if(ango[i]>=97&&ango[i]<=122){
					ango[i]=ango[i]-1;
					if(ango[i]==96){
						ango[i]=122;
					}
				}
			}

			for(int i=0,j=0;i<=leng;i++,j++){
				if(ango[i]>=97&&ango[i]<=122&&i!=leng){
					ttt[j]=ango[i];
				}
				else{
					if((ttt[0]=='t'&&ttt[1]=='h'&&ttt[2]=='e'&&j==3)||(ttt[0]=='t'&&ttt[1]=='h'&&ttt[2]=='i'&&ttt[3]=='s'&&j==4)||(ttt[0]=='t'&&ttt[1]=='h'&&ttt[2]=='a'&&ttt[3]=='t'&&j==4)){
						b=0;
						break;
					}
					j=-1;
				}
			}
		}
		printf("%s\n",ango);
	}
	return 0;
}

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

using namespace std;

string doCaesar ( string s, int n )
{
	for (int i = 0, I = s.size(); i < I; ++i) {
		if (s[i] < 'a' || 'z' < s[i]) { continue; }
		s[i] = (s[i] - 'a' + n) % 26 + 'a';
	}
	return s;
}

int main ( void )
{
	string S[] = { "the", "the.", "this", "this.", "that", "that." };

	istringstream iss;
	string s;

	while (getline(cin, s)) {
		bool hit = false;
		for (int i = 0; i < 26 && !hit; ++i) {
			string t;
			iss.clear();
			iss.str(doCaesar(s, 26-i));
			while(iss >> t && !hit) {
				for (int w = 0, W = sizeof(S)/sizeof(string); w < W && !hit; ++w) {
					if (S[w] == t) {
						hit = true;
					}
				}
			}
			if (hit) {
				cout << doCaesar(s, 26-i) << endl;
			}
		}
	}

	return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <vector>
#include <math.h>

using namespace std;

int main(){
	string str;

	while( getline(cin, str) ){
		bool flag = 0;
		while(!flag){
			for(int i=0;i<str.size();i++){
				if(str[i]>='a' && str[i]<='z'){
					str[i]=(char)(str[i]+1);
					if(str[i]>'z'){
						str[i]-=('z'-'a'+1);
					}
				}
			}
			if(str.find("the")!=string::npos || str.find("this")!=string::npos || str.find("that")!=string::npos ){
				flag = 1;
			}
			//cout << str << endl;
		}
		cout << str << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;


int main(){
	string tmp;
	string key[] = {"the","this","that"};
	int alfabet = 26;
	bool clearFlag = false;
	while(getline(cin,tmp)){

		while(alfabet--){

			for(string::iterator it = tmp.begin(); it != tmp.end(); it++){
				if(*it >= 'a' && *it <= 'z'){
					(*it)++;
					if(*it >= 'z'){
						*it = 'a';
					}
				}
			}
			for(int j = 0; j < 3; j++){
				if(tmp.find(key[j]) != string::npos){
					cout << tmp << endl;
					clearFlag = true;
					break;
				}
			}

			if(clearFlag == true){
				break;
			}

		}

	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>
#include <sstream>
#include <stdlib.h>

using namespace std;

int main(void){
	
	while( true ) {
		if( cin.eof() ) break;
		string str;
		string ans;
		getline( cin, str );

		for( int i = 0; i < 26; i++ ) {
			string newstr;
			newstr = str;
			for( int j = 0; j < str.length(); j++ ) {
				if( str[j] < 'a' || str[j] > 'z' ) continue;
				else {
					newstr[j] = ( str[j] - 'a' + i ) % 26 + 'a';
				}
			}
			if( newstr.find("the") != string::npos || newstr.find("this") != string::npos || newstr.find("that") != string::npos ) {
				ans = newstr;
				break;
			}
		}
		cout << ans << endl;
	}

	
    return 0;
}

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

using namespace std;

typedef unsigned long long ull;
#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define all(a) (a).begin(), (a).end()

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

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