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 <cctype>
#include <string>
#include <iostream>

using namespace std;

int main()
{
	string S[80]; int C = 0;

	while (getline(cin, S[C]))
	{
		C++;
	}

	for (int i = 0; i < 26; i++)
	{
		for (int c = 0; c < C; c++)
		{
			if (!(S[c].find("this") == string::npos && S[c].find("that") == string::npos && S[c].find("the") == string::npos))
			{
				for (int j = 0; j < C; j++) { cout << S[j] << endl; }

				goto Exit;
			}

			for (string::size_type j = 0; j < S[c].size(); j++)
			{
				if (isalpha(static_cast<int>(S[c][j])))
				{
					if (S[c][j] == 'z')
					{
						S[c][j] = 'a';
					}
					else
					{
						S[c][j]++;
					}
				}
			}
		}
	}

Exit:;

	return 0;
}

C++: #include <iostream>
#include <string>
//#include <string.h>
using namespace std;
int main(){
	char alpha[] = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string str;
	while( 1 ){
		if( getline( cin, str ).eof() ) break;
		for( int a = 0; a < 26; a++ ){
			for( size_t i = 0; i < str.length(); i++ ){
				for( size_t j = 0; j < sizeof(alpha); j++ ){
					if( str[i] == alpha[j] ){
						str[i] = alpha[j + 1];
						break;
					}
				}
			}
			if( str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos ){
				break;
			}
		}
		cout << str << endl;
	}
}

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

using namespace std;


int main(){
	string line;

	while(getline(cin, line)){
		int flag = 0;

		for(int i=0 ; i<26 ; i++){
			for(int j=0 ; j<line.size() ; j++){
				if(line[j] != ' ' && line[j] != '.'){
					if(line[j] == 'a'){
						line[j] = 'z' ;
					}else{
						line[j]--;
					}
				}
			}

			for(int k=0 ; k<line.size()-2 ; k++){
				if(line[k] == 't' && line[k+1] == 'h'){
					flag = 1;
					cout << line << endl;
					break;
				}
			}
			if(flag == 1) break;
			cout << line << endl;
		}
		//cout << line << endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int caesar(string s)
{
	string s0 = "this";
	string s1 = "that";
	string s2 = "the";

	if (s.size() > 4)
	{
		return -1;
	}

	for (int i = 0; i <= 26; i++)
	{
		if (s == s0 || s == s1 || s == s2)
		{
			return i;
		}
		for (int j = 0; j < 4; j++)
		{
			s0.at(j) = s0.at(j)++;
			if (s0.at(j) > 'z')
			{
				s0.at(j) = 'a';
			}
			s1.at(j) = s1.at(j)++;
			if (s1.at(j) > 'z')
			{
				s1.at(j) = 'a';
			}
		}
		for (int j = 0; j < 3; j++)
		{
			s2.at(j) = s2.at(j)++;
			if (s2.at(j) > 'z')
			{
				s2.at(j) = 'a';
			}
		}
	}

	return -1;
}

int main()
{
	string str;
	for (; getline(cin, str);)
	{
		stringstream ss;
		ss << str;

		vector<string> w;
		string s;
		int c = -1;
		for (; ss >> s;)
		{
			w.push_back(s);
			
			if (c == -1)
			{
				c = caesar(s);
			}
		}

		for (int i = 0; i < w.size(); i++)
		{
			for (int j = 0; j < w.at(i).size(); j++)
			{
				if (w.at(i).at(j) != '.')
				{
					char sp = w.at(i).at(j) - c;
					if (sp < 'a')
					{
						int p = 'a' - sp;
						w.at(i).at(j) = 'z' - p;
					}
					else
					{
						w.at(i).at(j) = sp;
					}
				}			
			}

			cout << w.at(i) << (i == w.size() - 1 ? "" : " ");
		}

		cout << endl;
	}
}

C++: #include <iostream>
#include <string.h>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
	char st[81];
	string w[3]={"the","this","that"};
	int wn[3]={3,4,4},k,i,j,s,f,z;
	while(true) {
    k=0; z=0;
	scanf("%81[a-z. \n]",st);
	z=strlen(st);
	while(k<z) {
		for (i=0;i<3;i++) {
			s=0; f=0;
			if (z<=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]]<'a' || st[k+wn[i]]>'z' ))  { f=1; i=5;}
		}
		if (f==1) break;
		for (k;st[k]>='a' && st[k]<='z';k++);
		k++;
		}
	if (f==0) cout << st; else {
	for (i=0;i<z;i++) if ((st[i]>='a' && st[i]<='z')) cout << (char)(st[i]-(st[k]-'t')) ; else cout << st[i];
	  }	
	}
    return 0;
	}

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define NCLR(a) memset((a), -1 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
typedef complex<double> P;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 1000000007;
static const int INF = 1 << 30;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { -1, 0, 1, 0, 1, -1, 1, -1 };
static const int dy[] = { 0, -1, 0, 1, 1, 1, -1, -1 };

string str;
map<char, char> change;

int main() {
	for ( int i = 0; i < 26; i++ ) {
		change[ i + 'a' ] = ( i + 1 ) % 26 + 'a';
	}
	getline( cin, str );
	for ( ;; ) {
		for ( int j = 0; j < str.size(); j++ ) {
			if ( str[ j ] >= 'a' && str[ j ] <= 'z' ) {
				str[ j ] = change[ str[ j ] ];
			}
		}
		bool is_can = false;
		for ( int j = 0; j < str.size() - 2; j++ ) {
			if ( str.substr( j, 3 ) == "the" ) {
				is_can = true;
				break;
			}
		}
		for ( int j = 0; j < str.size() - 3; j++ ) {
			if ( str.substr( j, 4 ) == "that" || str.substr( j, 4 ) == "this" ) {
				is_can = true;
				break;
			}
		}
		if ( is_can ) {
			break;
		}

	}
	printf( "%s\n", str.c_str() );
	return 0;
}