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>
#include <algorithm>
using namespace std;
 
int main(){
	string str;
	while(getline(cin, str)){
		while(1){
			for(int i=0; i<(int)str.length(); i++){
				if('a' <= str[i] && str[i] <'z'){
					str[i]++;
				}else if(str[i]=='z'){
					str[i]='a';
				}
			}
			if(str.find("this")==string::npos && str.find("that")==string::npos && str.find("the")==string::npos){
				continue;
			}
			cout << str << endl;
			break;
		}
	}
	return 0;
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

string decode(string inp,int n){
    for(int i=0;i<inp.length();i++){
        if('a'<=inp[i]&&inp[i]<='z'){
            
            inp[i]=inp[i]-n;
            if(inp[i]<'a') inp[i]+=('z'-'b');
        }
    }
    return inp;
}


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

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

char shift(char in){
	if('a'<=in&&in<='y'){
		return in+1;
	}else if(in=='z'){
		return 'a';
	}else{
		return in;
	}	
}
int main(){
	char a[100];
	string data;
	while(cin.getline(a,100)){
//	cout<<a<<endl;
		while(true){
			data=a;
			if(data.find("the")!=-1 || data.find("this")!=-1 || data.find("that")!=-1)
				break;
			for(int i=0;a[i]!='\0';i++){
				a[i]=shift(a[i]);
			}
//		cout<<a<<endl;
		}
		cout<<data<<endl;
	}
}

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

int main(){
	string s, strCopy;
	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 <string>
using namespace std;


int main()
{
	string s, line[81];
	int counter = 0;
	getline(std::cin, s);
	s += "\n";

	//入力内容を配列にとる．
	string word = "";
	for (int i = 0; i < (signed)s.length(); i++){
		if (s[i] == ' ' || s[i] == '\n'){
			line[counter++] = word;
			word = "";
		}
		else{
			word += s[i];
		}
	}

	

	//ずらす数を探す
	int slide;
	for (int i = 0; i <= 26; i++){
		for (int j = 0; j < counter; j++){
			string word = "";
			for (int k = 0; k < (signed)line[j].length(); k++){
				if (line[j][k] != '.' && line[j][k] != ' '&& line[j][k] != '\n'){
					word += 'a' + (line[j][k] + i - 'a') % 26;
				}
				else{
					word += line[j][k];
				}
			}
			if (word == "the" || word == "this" || word == "that"){
				slide = i;
				goto jump;
			}

		}
	}

jump:

	//ずらすべき数だけずらす
	for (int i = 0; i < counter; i++){
		for (int j = 0; j <(signed)line[i].length(); j++){
			if (line[i][j] != '.' && line[i][j] != ' '&& line[i][j] != '\n'){
				line[i][j] = 'a' + (line[i][j] + slide - 'a') % 26;
			}
		}
	}

	//出力
	for (int i = 0; i < counter - 1; i++){
		cout << line[i] << " ";
	}
	cout << line[counter - 1] << endl;


	return 0;
}

C++: #include<iostream>
#include<string>
int main(){
	std::string str;
	std::getline(std::cin,str);
	for(int i=0;i<str.size();i++){
		if(str[i]!=' ')str[i]+=1;
	}
	std::cout<<str<<std::endl;
	return 0;
}

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

using namespace std;

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

int main()
{
	solve();
	return(0);
}

C++: #include<cstdio>

using namespace std;



char shiftch(char p, int n){
	int t;
	if('A'<= p && p <='Z'){
		p-='A';
		if(n<0) n+=26;
		p+=n;
		p%=26;
		p+='A';
		return p;
	}
	else if('a'<= p && p <='z'){
		p-='a';
		if(n<0) n+=26;
		p+=n;
		p%=26;
		p+='a';
		return p;
	}
	else return p;
}

int main(){

	int	i, j, n;
	char in[1000], *p, *tp;
	p= in;

//	scanf("%[^\n]", in);
	fgets(in, 1000, stdin);
	for(n=0; 16<=in[n] && in[n]<=126; n++);


	while(1){
		tp=p;
		for(i=0; *(p++)!=' ';	i++);
		if(i==3||i==4){

			j=*tp-'t'; if(*(tp+1)=='h'+j) break;
			j=*tp-'T'; if(*(tp+1)=='h'+j){
			j+='a'-'A';
			break;
			}
		}
	}
	for(i=0; i<n; i++)	in[i]=shiftch(in[i],-j);

	printf("%s\n",in);

	return 0;
}

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

using namespace std;

int main() {
  string str;
  getline(cin, str);
  for (int i = 0; i < 26; ++i) {
    for (char& c : str) {
      if (isalpha(c)) {
        if (c != 'z') ++c;
        else c = 'a';
      }
    }
    if (str.find("that") != string::npos || str.find("this") != string::npos || str.find("the") != string::npos) {
      cout << str << endl;
    }
  }
}

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

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){

    string s[] = {"this","the","that"};
    vector<string> in;
    while(true){
	string temp;
	cin >> temp;
	if(cin.eof()) break;
	in.PB(temp);

    }
    bool f = false;
    int d = 1;
    REP(i,30){

	f = true;
	REP(i,in.size()) REP(j,in[i].size()){
	    if(in[i][j] == '.') continue;
	    in[i][j] = (char)( 'a' + ( (int)(in[i][j] - 'a') + d) % 28);
	}
	vector<bool> flgs(3,false);
	for(int i=0;i<in.size();i++){
	    REP(j,3){
		bool flg = true;
		REP(k,s[j].size()) if(s[j][k] != in[i][k]) flg = false;
		if(flg)
		    flgs[j] = true;
	    }
	}
	if(flgs[0] && (flgs[1] || flgs[2])) break;
    }
    REP(i,in.size()-1) cout << in[i] << " ";
    cout << in[in.size()-1] <<  endl;

    return 0;
}