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++: 
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 checkch(char p){
	if('A'<= p && p <='Z') return 2;
	else if('a'<= p && p <='z') return 1;
	else return 0;
}


int main(){

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

	scanf("%[^\n]", in);
	n= strlen(in);
//	printf("%d\n", 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;
			}
		}
//		++p;
	}
	for(i=0; i<n; i++)	in[i]=shiftch(in[i],-j);

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

	
	
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str, the = " the", dis = " this", that = " that";
	int zure, count = 0, i = 0;
	string judge = " ";
	bool bo = false;
	getline(cin, str);
		for (int j = 0; j < str.size(); j++) {
			zure = str[i] - 't';
			if (str[j] != ' ' && str[j]!='.') {
				if (str[j] - zure>='a'&&str[j]-zure<='z') {
					judge += str[j] - zure;
				}
				else if(str[j]-zure>'z'){
					judge += str[j] - 26 - zure;
				}
				else {
					judge += str[j] + 26 + zure;
				}
			}
			if (str[j] == ' ' || j == str.size() - 1) {
				if (judge == " the" || judge == " this" || judge == " that") {
					bo = true;
					break;
				}
				else {
					i = j+1 ;
					judge = " ";
				}
			}
		}
	for (int i = 0; i < str.size(); i++) {
		if (str[i] >= 'a'+abs(zure) && str[i] <= 'z' - abs(zure)) {
			str[i] -= zure;
		}
		else if ((str[i]-abs(zure) < 'a' || str[i]+abs(zure) > 'z') && str[i]!=' ' && str[i]!='.') {
			if (str[i] + zure > 'z') {
				str[i] -= zure; 
			}
			else if (str[i] - zure > 'z') {
				str[i] -= 26 + zure;
			}
			else if (zure < 0) {
				str[i] -= zure;
			}
			else {
				str[i] += 26 - zure;
			}
		}
		cout << str[i];
	}
	cout << endl;
	return 0;
}

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


int main()
{
	string s, line[81];
	while (getline(std::cin, s)){
		fill(line, line + 81, "");
		int counter = 0;
		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>
using namespace std;
 
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	string str;
	getline(cin, str);
	
	while(1){
		for(size_t i = 0; i < str.size(); ++i){
			if('a' <= str[i] && str[i] <= 'z'){
				if(str[i] == 'z'){
					str[i] = 'a';
				}
				else {
					str[i]++;
				}
			}
		}
		bool check = false;
		for(size_t i = 0; i < str.size(); ++i){
			if(str[i] == 't'){
				if(str.substr(i, 3) == "the" || str.substr(i, 4) == "this" || str.substr(i, 4) == "that"){
					check = true;
					break;
				}
			}
		}
		if(check){
			break;
		}
	}
	cout << str << endl;
	
	return 0;
}

C++: #include <bits/stdc++.h>
#define ll long long
#define vl vector<ll>
#define pl pair<ll,ll>
#define FOR(i,a,b) for(ll i=a;i<b;i++)
#define rep(i,b) for(ll i=0;i<b;i++)
#define RFOR(i,a,b) for(ll i=b-1;i>=a;i--)
#define rsort(v) sort((v).rbegin(), (v).rend())
#define all(v) (v).begin(),(v).end()
using namespace std;
ll mod=1000000007;

signed main(){
    string s;
    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;
            }
        }
    }
}