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.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#define li long long int
#define ld long long double
#define PI 3.1415926535897932384626
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> P;

string str;
char word[3][5]={"the","this","that"};
char sent[80][80]={};
int main()
{
  bool ans=false;
  while(getline(cin,str)){
    int i=0,j=0;
    if(str.size()==0)break;
    scanf("%*c");
    int num=0;
    for(i=0;num<str.size();i++){
      for(j=0;;j++){
	sent[i][j]=str[num];
	num++;
	if(sent[i][j]==' '){
	  sent[i][j]='\0';
	  break;
	}
	if(sent[i][j]=='\0')break;
      }
    }
    //cout<<i<<endl;
    int gap,k,l;
    
    rep(gap,26){
      rep(k,i) rep(l,strlen(sent[k])){
	if(sent[k][l]>='a' && sent[k][l]<'z')
	   sent[k][l]++;//??????????????????
	else if(sent[k][l]=='z')
	  sent[k][l]='a';
      	//cout<<sent[k][l];//debug
      }
      // cout<<endl;//debug
      rep(k,i)
	if(strcmp(sent[k],word[0])==0 || strcmp(sent[k],word[1])==0 
	   || strcmp(sent[k],word[2])==0){
	  rep(l,i){
	    for(int a=0;a<strlen(sent[l]);a++)
	      cout<<sent[l][a];
	    if(l<i-1)
	      cout<<" ";
	    else
	      cout<<endl;
	  }
	  ans=true;
	  break;
	}
      if(ans)break;
    }
  }
}

C++: #include <iostream>

using namespace std;

int main(void) {
	char str[81];
	int shift = 0;
	while(cin.getline(str, 81)) {
		for(int i = 0; str[i] != NULL; i++) {
			if((str[i] != NULL) && (str[i+1] != NULL) && (str[i+2] != NULL) &&
				(str[i] != ' ') && (str[i+1] != ' ') && (str[i+2] != ' ')) {
					if(str[i+1] - str[i] == 'h' - 't') {
						if(str[i+2] - str[i+1] == 'e' - 'h') {
							shift = 't' - str[i];
							break;
						}
						if(str[i+3] != NULL && str[i+3] != ' ') {
							if((str[i+2] - str[i+1] == 'i' - 'h') && (str[i+3] - str[i+2] == 's' - 'i')) {
								shift = 't' - str[i];
								break;
							}
							if((str[i+2] - str[i+1] == 'a' - 'h') && (str[i+3] - str[i+2] == 't' - 'a')) {
								shift = 't' - str[i];
								break;
							}
						}
					}
			}
		}

		for(int i = 0; str[i] != NULL; i++) {
			if(str[i] != ' ' && str[i] != '.') {
				str[i] = (str[i] - 'a' + shift) % ('z' - 'a' + 1) + 'a';
			}
		}

		cout << str << endl;
	}
	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<cstdio>
#include<string>
#include<iostream>
#include<algorithm>
using namespace std;

int caesar[26][255], x, enkrip[100];
int thiss[] = {'t', 'h', 'i', 's'}, the[] = {'t', 'h', 'e'}, that[] = {'t', 'h', 'a', 't'};
string s;
int main() {
	for(int i = 0; i <= 25; i++) {
		for(char j = 'a'; j <= 'z'; j++) {
			if(j + i > 'z') x = j + i - 26; else x = j + i;
			caesar[i][x] = j;
		}
	}
	while(getline(cin, s)) {
	for(int k = 0; k <= 25; k++) {
		int l = 0, z = 0, zz = 0;
		for(int i = 0, j = s.size(); i != j; i++) {
			if(s[i] <= 'z' && s[i] >= 'a') {
				enkrip[i] = caesar[k][s[i]];
				if(enkrip[i] == thiss[l]) l++;
				if(enkrip[i] == the[z]) z++;
				if(enkrip[i] == that[zz]) zz++;
			} else {enkrip[i] = s[i]; if(l < 4) l = 0; if(z < 3) z = 0;if(zz < 4) zz = 0; }
		}
		if(l >= 4 || z >= 3 || zz >= 4) {
			for(int i = 0, j = s.size(); i != j; i++) {
				printf("%c", enkrip[i]);
			}
			printf("\n");
			break;
		}
	}}
	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;
	while (getline(cin,b))
	{
		a.append(b);
		a.append("\n");
	}
	while (check(a))
	{
		a = henkan(a);
	}
	cout << a << endl;
	
}