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 <cstdlib>
#include <cstdio>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>

using namespace std;


bool solve(){
	
	string s;
	while(getline(cin,s)){
		string str[26];
		int num;
		for(int i=0;i<26;i++){
			str[i] = s;
			for(int j=0;j<str[i].size();j++){
				for(int k=0;k<i;k++){
					if(str[i][j]=='.' || str[i][j]==' '){
						continue;
					}
					if(str[i][j] == 'a'){
						str[i][j] == 'z';
					}
					str[i][j]--; 
				}
			}
			
			for(int j=0;j<str[i].size();j++){
				string str_temp, str_temp2;	
				if(j <= str[i].size()-3){
					str_temp  = str[i].substr(j,3);
				}
				if(j <= str[i].size()-4){
					str_temp2 = str[i].substr(j,4);
				}
				if(str_temp=="the" || str_temp2=="this" || str_temp2=="that"){
					num = i;
				}
			}
		}
		
		
		cout<< str[num]<< endl;
	}		
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}

string strstep(string l){
	string r="";
	rp(i,l){
		if(l[i]=='z'){
			r+='a';
		}else if(l[i]>='A' && l[i]<='y'){
			r+=(l[i]+1);
		}else{
			r+=l[i];
		}
	}
	return r;
}
bool findth(string& string){
	bool flag=false;
	size_t found;
	found=string.find("the");
	if(found!=string::npos){
		flag=true;
	}
	found=string.find("this");
	if(found!=string::npos){
		flag=true;
	}
	found=string.find("that");
	if(found!=string::npos){
		flag=true;
	}
	return flag;
}
int main()
{
	string s;
	while(getline(cin, s)){
		rep(i,26){
			if(findth(s)){
				cout << s << endl;
				break;
			}else{
				s=strstep(s);
			}
		}
	}

}

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

bool isSmallAlphabet(char ch) {
  /* a ~ z(ascii) : 97 ~ 122 */
  if('a' <= ch && ch <= 'z') return true;
  else return false;
}

bool isHit(string str) {
  if((int)str.find("the") >= 0) return true;
  else if((int)str.find("this") >= 0) return true;
  else if((int)str.find("that") >= 0) return true;
  else return false;
}

/* ????????¶??????????§£??? */
string CaesarCipher(string _str) {
  
  /* parameter??????????????¢??????????????????????????????????????? */
  for(int parameter = 1; parameter < 26; ++parameter) {
    string str = _str;
    for(int i = 0; i < (int)str.length(); ++i) {
      
      /* ?°?????????¢??????????????????????????? */
      if(isSmallAlphabet(str[i])) {
        str[i] += parameter;
        /* ???????????????????°?????????§???????????£??????*/
        if(!isSmallAlphabet(str[i])) {
          str[i] -= 26;
        }
      }

    }

    /* Find "the" or "this" or "that" */
    if(isHit(str)) {
      return str;
    }
  }

  return "cannot found";
}

int main() {
  string str;
  while(getline(cin, str)) {
    cout << CaesarCipher(str) << endl;
  }
  return 0;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    string s;
    
    while(getline(cin,s)){
        
        for(int i=0;i<27;i++){
            for(int j=0;j<s.size();j++){
                if(s[j]=='z'){s[j]='a';}
                else if(!isalpha(s[j])){}
                else s[j]=char(s[j]+1);
            }
            if(s.find("this")!=string::npos||s.find("that")!=string::npos||s.find("the")!=string::npos){
                cout<<s<<endl;
                break;
            }
            
            
        }
        
        
    }
    
    return 0;
}

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 <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' && (i == 0 || str[i - 1] == ' ')){
				if(str.substr(i, 3) == "the" && (str[i + 3] == ' ' || str[i + 3] == '.') ){
					check = true;
					break;
				}
				if((str.substr(i, 4) == "this" || str.substr(i, 4) == "that") && (str[i + 4] == ' ' || str[i + 4] == '.') ){
					check = true;
					break;
				}
			}
		}
		if(check){
			break;
		}
	}
	cout << str << endl;
	
	return 0;
}