Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

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

using namespace std;

void split(string s,vector<string> *a)
{
	string tmp;
	for(int i=0;i<s.length();i++)
	{
		if(s[i]!=' ')
		{
			tmp.append(1,s[i]);
		}
		else
		{
			a->push_back(tmp);
			tmp.clear();
		}
	}
	a->push_back(tmp);
}

bool judge(vector<string> str)
{
	for(int i=0;i<str.size();i++){
		if(str[i].compare("the")==0||
			str[i].compare("this")==0||
			str[i].compare("that")==0)
		{
			return false;
		}
	}
	return true;
}

void rotate(string *s)
{
	for(int i=0;i<s->length();i++)
	{
		if('a'<=s->at(i)&&s->at(i)<='z')
		{
			if(s->at(i)=='z')
			{
				s->at(i)='a';
			}
			else
			{
				s->at(i)+=1;
			}
		}
	}
}

int main(void)
{
	string line;
	while(getline(cin,line))
	{
		vector<string> str;
		split(line,&str);
		while(judge(str))
		{
			for(int i=0;i<str.size();i++)
			{
				rotate(&str[i]);
			}
		}
		cout<<str[0];
		for(int i=1;i<str.size();i++)
		{
			cout<<" "<<str[i];
		}
		cout<<endl;
	};
}

C++: #include <stdio.h>
int check(int a,int b,int c,int d)
{
    //printf("[%d][%d][%d][%d]\n",a,b,c,d);
    if(a != 14)return 0;
    else if(b == 23 && c == 0)return 1;
    else if(b == 1 && c == 10 && d == 0)return 1;
    else if(b == 19 && c == 19 && d == 0)return 1;
    else return 0;
}

int main()
{
    int longth,mem = 0;
    while(1)
    {
        char str[90] = {0};
        int mem1[90] = {0},mem2[90] = {0};
        if(scanf("%c",&str[0]) == -1)return 0;
        if(str[0] >= 'a' && 'z' >= str[0])mem1[0] = str[0] - 'a' + 1;
        for(int i = 1; i < 80; i++)
        {
            scanf("%c",&str[i]);
            if(str[i] == '\n')break;
            longth = i;
            if(str[i] >= 'a' && 'z' >= str[i])mem1[i] = str[i] - 'a' + 1;
        }
        for(int i = 0; i < longth; i++)
        {
            if(mem1[i] == 0);
            else if(mem1[i + 1] != 0)
            {
                if(mem1[i] <= mem1[i + 1])mem2[i] = mem1[i + 1] - mem1[i];
                else mem2[i] = 26 - mem1[i] + mem1[i + 1];
            }
        }
        /*for(int i = 0; i < longth; i++)
        {
            printf("[%d]",mem2[i]);
        }
        printf("\n");*/
        for(int i = 0; i < longth; i++)
        {
            if(mem2[i] == 0) ;
            else if(i == 0)/*printf("[%d]\n",i);*/if(check(mem2[i],mem2[i + 1],mem2[i + 2],mem2[i + 3]))if(mem1[i] <= 20)mem = 20 - mem1[i];else mem = 26 - mem1[i] + 20;
            else if(mem2[i - 1] == 0)/*printf("{%d}\n",i);*/if(check(mem2[i],mem2[i + 1],mem2[i + 2],mem2[i + 3]))if(mem1[i] <= 20)mem = 20 - mem1[i];else mem = 26 - mem1[i] + 20;
            //else printf("no\n");
        }
        //printf("{{%d}}\n",mem);
        for(int i = 0; i < longth + 1; i++)
        {
            if(str[i] >= 'a' && 'z' >= str[i])printf("%c",(str[i] - 'a' + mem) % 26 + 'a');
            else printf("%c",str[i]);
        }
        printf("\n");
    }
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cctype>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<set>
#include<map>
#include<bitset>
#include<utility>
#include<string>

using namespace std;

main(){
  int n,i,j,l,temp;
  string b;
  while(getline(cin,b)){
    while(1){
      for(i=0;i<b.size();i++){
	if(isalpha(b[i])){
	  if(b[i]=='z'){
	    b[i]='a';
	  }
	  else{
	    b[i]=b[i]+1;
	  }
	}
      }
      if(b.find("the")!=-1 || b.find("that")!=-1 || b.find("this")!=-1){
	cout << b <<endl;
	break;
      }
    }
  }
}

C++: // 2014/02/08 Tazoe

#include <iostream>
#include <string>
using namespace std;

int main()
{
	while(true){
		string S;
		getline(cin, S);

		if(cin.eof())
			break;

		while(true){
			for(int i=0; i<S.size(); i++){
				if(S[i]=='z'){
					S[i] = 'a';
				}
				else if('a'<=S[i] && S[i]<='y'){
					S[i] = S[i]+1;
				}
			}

			if(S.find("the", 0)!=string::npos || S.find("this", 0)!=string::npos || S.find("that", 0)!=string::npos)
				break;
		}

		cout << S << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<string>
#include<sstream>
#include<vector>
using namespace std;
signed main(){
        char s[100];
        while( fgets(s, 100, stdin) != NULL ){
                vector<string> words;
                istringstream stream(s);
                string word;
                while(getline(stream, word, ' ')) words.push_back(word);
                int d;
                for(auto w: words){
                        if(w.length()==3 &&
                                        ((int)w[0] - (int)w[1] == (int)'t' - (int)'h') &&
                                        ((int)w[1] - (int)w[2] == (int)'h' - (int)'e')){
                                d = (int)w[0] -'t';
                                break;
                        }else if(w.length()==4 &&
                                        ((int)w[0] - (int)w[1] == (int)'t' - (int)'h') &&
                                        ((int)w[1] - (int)w[2] == (int)'h' - (int)'i') &&
                                        ((int)w[2] - (int)w[3] == (int)'i' - (int)'s')){
                                d = (int)w[0] -'t';
                                break;
                        }else if(w.length()==4 &&
                                        ((int)w[0] - (int)w[1] == (int)'t' - (int)'h') &&
                                        ((int)w[1] - (int)w[2] == (int)'h' - (int)'a') &&
                                        ((int)w[2] - (int)w[3] == (int)'a' - (int)'t')){
                                d = (int)w[0] -'t';
                                break;
                        }
                }
                for(unsigned int i=0; i<100 && s[i]!=0;i++){
                        char c=s[i];
                        if('a'<=c&&c<='z') printf("%c",(char)(c-d));
                        else if(c=='.'||c==' ') printf("%c",c);
                }
                printf("\n");
        }
        return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<cstring>
#include<utility>
#include<set>
#include<stack>
#include<complex>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define CC puts("-------ok--------");
#define all(in) in.begin(), in.end()
#define bv vector<bool>
using namespace std;
typedef pair<int, int>PI;
using namespace std;
#define MAX  999999
int main(){
    string s;
    getline(cin,s);
    rep(i,26){
        rep(j,s.size()){
            if(s[j]>='a'&&s[j] <='z')
                (s[j] == 'z') ? s[j] ='a' : s[j] = s[j]+1;
        }
        
        if(s.find("this")!= string::npos){cout<<s<< endl;}
        else if(s.find("that")!= string::npos){cout<<s<< endl;}
        else if(s.find("the")!= string::npos){cout<<s<< endl;}
        }
    return 0;
}