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<stdio.h>
#include<string.h>
#include<ctype.h>

int main()
{
	char str[90];
	
	while( fgets( str, 81, stdin ) != 0 ){
		while( 1 ){
			for( int i = 0; i < strlen( str ); i++ ){
				if( isalpha( str[i] ) ) str[i]++;
				
				if( str[i] > 'z' ){
				 	str[i] = 'a';
				}
			}
			
			if( strstr( str, "the" ) != NULL || strstr( str, "this" ) != NULL || strstr( str, "that" ) != NULL ) break;
		}
		
		std::cout << str;
	}

 	return 0;
}

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

bool IsValid(const std::string& Text)
{
    return 
        Text.find("the")  != std::string::npos ||
        Text.find("this") != std::string::npos ||
        Text.find("that") != std::string::npos;
}
std::string RotateChar(const std::string& Code, int Key)
{
    std::string Text = Code;
    for(std::size_t i = 0; i < Text.size(); ++i){
        if(Text[i] == ','
        || Text[i] == '.'
        || Text[i] == ' '){
            continue;
        }
        int c = Text[i] + Key;
        if(c < 'a') c += 26;
        if(c > 'z') c -= 26;
        Text[i] = c;
    }
    return Text;
}
std::string Decrypt(const std::string& Code)
{
    for(int i = 0; i < 26; ++i){
        std::string Text = RotateChar(Code, i);
        if(IsValid(Text)){
            return Text;
        }
    }
    assert(false);
    return "";
}
int main()
{
    while(true){
        std::string Code;
        std::getline(std::cin, Code);
        if(std::cin.eof()) break;
        std::cout << Decrypt(Code) << std::endl;
    }
    return 0;
}

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

using namespace std;

void shiftchar(char& ch)
{
	if (isalpha(ch)) {
		if (ch == 'z') {
			ch = 'a';
		} else {
			ch = ch + 1;
		}
	}
}

int main()
{
	string input;
	while (getline(cin, input)) {

		string decoded = input;
		for (int i = 0; i < 26; ++i) {
			for_each(decoded.begin(), decoded.end(), shiftchar);
			if (decoded.find("the") != string::npos ||
				decoded.find("this") != string::npos ||
				decoded.find("that") != string::npos) {
				break;
			}
		}

		cout << decoded << endl;
	}

	return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

vector<string> split_naive(const string &s, char delim) {
	vector<string> elems;
	string item;
	for (char ch: s) {
		if (ch == delim) {
			if (!item.empty())
				elems.push_back(item);
			item.clear();
		}
		else {
			item += ch;
		}
	}
	if (!item.empty())
		elems.push_back(item);
	return elems;
}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	char line[100];
	while(cin.getline(line,sizeof(line))){
		string S(line);
		auto T=split_naive(S,' ');
		int offset = 0;
		for(auto& x:T){
			int N=x.size();
			if(N==3){
				int a = x[0]-'a';
				int b = x[1]-'a';
				int c = x[2]-'a';
				if(c>=0 && c<=25 && ((a-b+26)%26)==12 && ((a-c+26)%26)==15){
					offset = a-('t'-'a');
					break;
				}
			}
			else if(N==4){
				int a = x[0]-'a';
				int b = x[1]-'a';
				int c = x[2]-'a';
				int d = x[3]-'a';
				if(d>=0 && d<=25 && ((a-b+26)%26)==12 && ((a-c+26)%26)==19 && ((a-d+26)%26)==0){
					offset = a-('t'-'a');
					break;
				}
				else if(d>=0 && d<=25 && ((a-b+26)%26)==12 && ((a-c+26)%26)==11 && ((a-d+26)%26)==1){
					offset = a-('t'-'a');
					break;
				}
			}
			else if(N==5){
				int a = x[0]-'a';
				int b = x[1]-'a';
				int c = x[2]-'a';
				int d = x[3]-'a';
				if(d>=0 && d<=25 && ((a-b+26)%26)==12 && ((a-c+26)%26)==19 && ((a-d+26)%26)==0){
					offset = a-('t'-'a');
					break;
				}
				else if(d>=0 && d<=25 && ((a-b+26)%26)==12 && ((a-c+26)%26)==11 && ((a-d+26)%26)==1){
					offset = a-('t'-'a');
					break;
				}
			}
		}
		for(int j=0;j<100;j++){
			if(line[j]>='a' && line[j]<='z'){
				int c=line[j]-'a';
				c=(c+26-offset)%26;
				line[j] = c+'a';
			}
		}
		out(line);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int n=0,m=0,maxe=0,co=0;;
    char str[82][82],a;
    while(cin>>a){
        if(a==' '){
           str[n][m]='\0';
           n++;
           m=0;
        }
        else m++;
    }
    for(int i=1;;i++){
        for(int j=0;j<maxe;j++){
            if(str[j][0]-i=='t'){
                if(str[j][1]-i=='h'&&str[j][2]-i=='i'&&str[j][3]-i=='s'||str[j][1]-i=='h'&&str[j][2]=='e'||str[j][1]-i=='h'&&str[j][2]-i=='a'&&str[j][3]=='t'){
                    co=i;
                    break;
                }
            }
        }
        if(co!=0)break;
    }
    for(int i=0;i<maxe;i++){
        for(int j=0;str[i][j]!='\0';j++){
                if(str[i][j]!='.')printf("%c",str[i][j]-co);
                else cout<<".";
        }
        if(i!=maxe-1)cout<<" ";
        else cout<<endl;
    }


}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <regex>
#include <cctype>
#include <string>
#include <utility>
using namespace std;

vector<string> v;
/*
vector<string> split(string&& s, regex&& pattern) {
    sregex_token_iterator first(s.begin(), s.end(), pattern, -1);
    sregex_token_iterator last;
    return(vector<string>(first, last));
}
*/
bool cheser() {
    for(int r = 1; r <= 26; r++) {
        bool found = false;
        for(int c = 0; c < v.size(); c++) {
            for(int k = 0; k < v[c].length(); k++) {
                if(!isalpha(v[c][k])) continue;
                int now = v[c][k] - 'a';
                now = (now+1)%26;
                v[c][k] = 'a' + now;
            }
            if(v[c] == "the" || v[c] == "this" || v[c] == "that") found = true;
        }
        if(found) return(true);
    }
    return(false);
}

int main(void) {
    string input;
    while(getline(cin, input)) {
       // v = split(move(input), regex(" "));
        cheser();
        for(int r = 0; r < v.size(); r++) {
            cout << v[r];
            if(r == v.size() - 1) cout << endl;
            else                  cout << " ";
        }
    }
    
    return(0);
}