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<algorithm>
#include<string>
using namespace std;
int main(){
  string s;
  int pl=0;
  getline(cin,s);
  for(int i =-30;i<30;i++){
    for(int j = 0; j < s.size()-3; j++){
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'e'&& s[j+3]==' '){
	pl = i;
	break;
      }
      if(j==s.size()-1) break;
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'a' && s[j+3]+i=='t' && s[j+4]==' '){
	pl = i;
	break;
      }
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'i' && s[j+3]+i=='s' && s[j+4]==' '){
	pl = i;
	break;
      }
    }
    if(pl!=0) break;
  }
  for(int i=0;i <s.size();i++){
    if(s[i]<='z' && s[i]>='a') s[i] += pl;
  }
  cout<<s<<endl;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main()
{
	string key;
	
	while (getline(cin, key)) {

		for (int j = 0; j < 26; j++) {
			for (int i = 0; i < key.size(); i++) {
				if (key[i] >= 'a' && key[i] <= 'z') {
					key[i] = (key[i] == 'z') ? 'a' : key[i] + 1;
				}
			}

			if (key.find("the") != string::npos || key.find("this") != string::npos || key.find("that") != string::npos)
				cout << key;
		}
	}
	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>
#pragma warning(disable:4996)

bool Check(char* Str);

int main()
{

	int  nCnt = 0;
	char PhraseIn[80];
	char PhraseOut[80] = "\0";
	int  nSlide = 1;

	gets(PhraseIn);

	while (1)
	{
		for (nCnt = 0; PhraseIn[nCnt] != '\0'; nCnt++)
		{
			if (PhraseIn[nCnt] == ' ' || PhraseIn[nCnt] == '.' || PhraseIn[nCnt] == '\n')
			{
				PhraseOut[nCnt] = PhraseIn[nCnt];
				continue;
			}

			PhraseOut[nCnt] = PhraseIn[nCnt] - nSlide;

			if (PhraseOut[nCnt] > 122)
				PhraseOut[nCnt] = 97 + (nSlide-1);

			if (PhraseOut[nCnt] < 97)
				PhraseOut[nCnt] = 122 - (nSlide - 1);
		}

		if (Check(PhraseOut))
			break;
		else
			nSlide++;
	}

	printf("%s", PhraseOut);


	return 0;
}

bool Check(char* Str)
{
	int nCnt = 0;
	int nCnt2 = 0;
	char Work[10] = "\0";

	while (Str[nCnt] != '\0')
	{
		Work[0] = '\0';
		nCnt2 = 0;
		while (1)
		{
			if (Str[nCnt] == ' ' || Str[nCnt] == '.' || Str[nCnt] == '\n' || Str[nCnt] == '\0')
			{
				nCnt++;
				break;
			}

			Work[nCnt2] = Str[nCnt];
			nCnt++;
			nCnt2++;
		}

		if (strcmp(Work, "this") == 0 || strcmp(Work, "the") == 0 || strcmp(Work, "that") == 0)
			return true;
	}

	return false;
}

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

using namespace std;


//the this that を探す
bool found(string s){
	if ((s.find("the") != -1) || (s.find("this") != -1) || (s.find("that") != -1))
		return true;
	else
		return false;
}


int main(){

	string str;
	getline(cin, str);
	string ans=str;

	int j = 0;

	while (!found(ans)){
		j++;
		for (int i = 0; i < str.size(); i++){
			if 
				(ans[i] == ' ') ans[i] = ans[i];
			else if 
				(ans[i] == '.') ans[i] = ans[i];
			else
				ans[i] = ((int)str[i] + j)>(int)'z' ? (char)((int)str[i] + j - 26) : (char)((int)str[i] + j);
		}
		if(found(ans)) break;
	} 
	
	cout << ans << endl;

	return 0;

}

C++: #include<cstring>
#include<cstdio>
#include<iostream>

#define REP(n) for(int i=0;i<n;i++)

using namespace std;


int main(){
	char a[100];

	while(NULL!=fgets( a, 80, stdin)){
		int n=strlen(a);

		while(NULL==strstr(a,"the")&&NULL==strstr(a,"this")&&NULL==strstr(a,"that")){
			REP(n){
				if('a'<=a[i] && a[i]<'z')	a[i]++;
				else if('z'==a[i]) a[i]='a';
			}
		}

	printf("%s",a);
	}

	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;

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

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