Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if len(infos) == 0 {
			break
		}
		// 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++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	string str;		// ????????????????????????????´???????
	string trans;	// ????????????????????????????´???????
	
	while (std::getline(cin, str))
	{
		trans.clear();
		trans.resize(80);
		// n?????????????????????????????§7????????????
		for (int i = -7; i < 7; i++)
		{
			for (size_t j = 0; j < str.size(); j++)
			{
				// ???????????????????????????????????????
				if (str[j] == ' ' || str[j] == '.')
				{
					trans[j] = str[j];
				}
				else
				{
					trans[j] = str[j] + i;
				}
			}
			// ?????????????????????find??¢??°???????????¨??????
			// ???????????£??????????¨??????????????????£????????????????????????
			if (!trans.find("this") || !trans.find("the") || !trans.find("that"))
			{
				cout << trans << endl;
				break;
			}
		}

	}
	return 0;
}

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

int main() {
	string st;
	string w[3]={"the","this","that"};
	int wn[3]={3,4,4},k=0,i,j,s,f;
	getline(cin,st);
	while(true) {
		for (i=0;i<3;i++) {
			s=0; f=0;
			if (st.size()<k+wn[i]) break;
			for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st[k+j+1])) s++;
			if (s==wn[i]-1 && st[k+wn[i]]==' ') { f=1; i=5; }
		}
		if (f==1) break;
		for(k;st[k]!=' ' && st[k]!='.' ;k++);
		if (st[k]=='.') break;
		k++;
		}
	if (f==0) cout << st; else {
	for (i=0;i<st.size();i++) if ((st[i]>='a' && st[i]<='z')) cout << (char)(st[i]-(st[k]-'t')) ; else cout << st[i];
	}	
	cout << endl;
    return 0;
	}

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

using namespace std;
static const int MAXV = 81;

bool hantei(char data[]);
void irekae(char data[]);

int main() {
  while(!feof(stdin)) {
    char data[MAXV];
    if(fgets(data, sizeof(data), stdin)==NULL) break;
    while(!hantei(data))
      irekae(data);
    printf("%s", data);
  }
}

bool hantei(char data[]) {
  if(strstr(data, "the")) return 1;
  if(strstr(data, "this")) return 1;
  if(strstr(data, "that")) return 1;
  return 0;
}

void irekae(char data[]) {
  for(int i=0;data[i]!=0;i++) {
    if(data[i]>='a' && data[i]<='z') {
      if(data[i]=='z')data[i]='a';
      else data[i]++;
    }
  }
}

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

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

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

int main(){
	string str[1000];
	int k = 0;
	int zure[1000];
	bool flag[1000] = {false};
	while(getline(cin, str[k])){
		for(int j = 0; j < 26; j++){
			for(int i = 0; i < str[k].size()-2; i++){
				if(str[k][i] == 't'+j && str[k][i+1] == 'h'+j && str[k][i+2] == 'e'+j){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 't'+j && str[k][i+1] == 'h'+j && str[k][i+2] == 'i'+j && str[k][i+3] == 's'+j){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
			for(int i = 0; i < str[k].size()-3; i++){
				if(str[k][i] == 't'+j && str[k][i+1] == 'h'+j && str[k][i+2] == 'a'+j && str[k][i+3] == 't'+j){
					zure[k] = j;
					flag[k] = true;
					break;
				}
			}
			if(flag[k] == true){
				k++;
				break;
			}
		}
	}
	for(int j = 0; j < k; j++){
		for(int i = 0; i < str[j].size(); i++){
			if(str[j][i] >= 'a' && str[j][i] <= 'z'){
				str[j][i] = str[j][i]-zure[j];
				if(str[j][i] < 'a'){
					str[j][i] = str[j][i]+26;
				}
			}
		}
		cout << str[j] << endl;
	}
}