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<iterator>
#include<sstream>
#include<vector>
#include<cstdio>
const int A_SIZE=26;
using namespace std;
bool is_the(string str){
  if(str.size()!=3){return false;}
  if((str[0]-str[1]+A_SIZE)%A_SIZE!=('t'-'h'+A_SIZE)%A_SIZE){return false;}
  if((str[1]-str[2]+A_SIZE)%A_SIZE!=('h'-'e'+A_SIZE)%A_SIZE){return false;}
  return true;
}
bool is_that(string str){
  if(str.size()!=4){return false;}
  if((str[0]-str[1]+A_SIZE)%A_SIZE!=('t'-'h'+A_SIZE)%A_SIZE){return false;}
  if((str[1]-str[2]+A_SIZE)%A_SIZE!=('h'-'a'+A_SIZE)%A_SIZE){return false;}
  if((str[2]-str[3]+A_SIZE)%A_SIZE!=('a'-'t'+A_SIZE)%A_SIZE){return false;}
  return true;
}
bool is_this(string str){
  if(str.size()!=4){return false;}
  if((str[0]-str[1]+A_SIZE)%A_SIZE!=('t'-'h'+A_SIZE)%A_SIZE){return false;}
  if((str[1]-str[2]+A_SIZE)%A_SIZE!=('h'-'i'+A_SIZE)%A_SIZE){return false;}
  if((str[2]-str[3]+A_SIZE)%A_SIZE!=('i'-'s'+A_SIZE)%A_SIZE){return false;}
  return true;
}
bool is_clue(string str){
  return is_the(str) || is_that(str) || is_this(str);
}

int main(){
  char str[80];
  while(cin.getline(str,80)!=0){
    istringstream iss{str};
    vector<string> strs;
    copy(istream_iterator<string>(iss), istream_iterator<string>(), back_inserter(strs));
    int offset=0;
    for(string a : strs){
      if(is_clue(a)){
	offset = 't'-a[0];
	break;
      }
    }
    for(char c : str){
      if(c=='\0'){putchar('\n');break;}
      if(c<'a'||c>'z'){putchar(c);}
      else if(c+offset>'z'){putchar(c+offset-A_SIZE);}
      else if(c+offset<'a'){putchar(c+offset+A_SIZE);}
      else{putchar(c+offset);}
    }
  }
}

C++: #include <bits/stdc++.h>
using namespace std;

typedef long long ll;
#define rep(i,n) for(i=0;i<n;++i)
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#define sc second

int main(int argc, char const *argv[]) {
  string s;
  while(getline(cin,s)){
    //cout << s << endl;
    string a="abcdefghijklmnopqrstuvwxyz";
    a += a;

    string t="";
    bool end=false;
    int i;
    for(int w=0; w<=25; ++w){
      printf("w=%d\n", w);
      t="";
      int p=0;
      rep(i,s.size()){
        if('a'<=s[i] && s[i]<='z'){
          t+=a[s[i]-'a'+w];
        }
        else{
          t+=s[i];
          string tmp=t.substr(p,i-p);
          //cout << tmp << endl;

          if(tmp=="this" || tmp=="the" || tmp =="that") end=true;

          p=i+1;
        }
      }

      if(end) break;
    }

    std::cout << t << std::endl;
  }
  return 0;
}

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

string change(string s,int num){

	for(int i=0;i<s.size();i++){
		if(s[i]+num>'z')s[i]=(s[i]+num-'z'+'a'-1);
		else s[i]=(s[i]+num);
	}
	return s;
}
char change(char c,int num){
	char re;
	if(c+num>'z')re=c+num-'z'+'a'-1;
	else re=c+num;
	return re;
}

int solve(string s){
	string now;
	
	for(int i=0;i<s.size();i++){
		if(s[i]>='a' && s[i]<='z')now+=s[i];
		else {
			for(int j=0;j<=26;j++){
				string tmp=change(now,j);
				if(tmp=="the" || tmp=="this" || tmp=="that"){
					return j;
				}
			}
			now.clear();
		}
	}
}

string ans(string s){
	int n=solve(s);
	string ans;
	for(int i=0;i<s.size();i++){
		if(s[i]>='a' && s[i]<='z')ans+=change(s[i],n);
		else ans+=s[i];
	}
	return ans;
}

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

C++: #include <bits/stdc++.h>
#define rep(i,a,n) for(int i=a;i<n;i++)
#define repr(i,a,n) for(int i=a;i>=n;i--)
#define INF 999999999
#define INF_M 2147483647
#define pb(a) push_back(a)

using namespace std;
typedef pair<int, int> pii;
typedef long long int ll;
typedef vector<pii> VP;

int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};

int main() {
    string s;
    getline(cin,s);
    string t(s.length(),' ');
    rep(j,0,26) {
    	rep(i,0,s.length()) {
			if('a' <= s[i] && s[i] <= 'z') t[i] = (s[i] + j > 'z') ? (s[i] + j - 26) : s[i] + j;
			else t[i] = s[i];
    	}
    	if(t.find("this") != string::npos) break;
    	else if(t.find("the") != string::npos) break;
    	else if(t.find("that") != string::npos) break;
    }
    cout << t << endl;
    return 0;
}

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

bool valid(string line){
  string t[3] = {"the", "this", "that"};
  for ( int i = 0; i < 3; i++ ){
    if ( line.find(t[i]) != string::npos ) return true;
  }
  return false;
}

void move(string &line){
  for ( int i = 0; i < line.size(); i++ ){
    if ( line[i] == 'a' ) line[i] = 'z';
    else if ( 'b' <= line[i] && line[i] <= 'z' ){
      line[i] = (char)(line[i]-1);
    }
  }
}
main(){
  string line;
  while(1){
    getline(cin, line);
    if ( cin.eof() ) break;
    while(1){
      if ( valid(line) ) {
	cout << line << endl;
	break;
      }
      move(line);
    }
  }
}

C++: #include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<stack>
#include<set>
#include<cmath>

#define REP(i,s,e) for(int i=int(s);i<=int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)

#define EPS 1e-6

using namespace std;

bool f(string a){

	string::size_type p=a.find("the");
	string::size_type q=a.find("this");
	string::size_type r=a.find("that");
	if(p!=string::npos || q!=string::npos || r!=string::npos)
	return true;
	else return false;

	}

int main(){

   string s,s1;

   while(true){

	getline(cin,s);
	if(cin.fail()) break;

	int n=s.size();

	REP(k,1,25){
	s1=s;
	rep(i,n){
	if('a'<=s1[i] && s1[i]<='a'-1+k) s1[i]+=26-k;
	if('a'+k<=s1[i] && s1[i]<='z') s1[i]+=-k;
	}

	if(f(s1)){ cout << s1 << endl; break; }

	}


	}


    return 0;
}

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

int main(int argc, char *argv[]){
	string s;
    while(getline(cin,s)){
		int c=0;
		while((s.find("that") ==string::npos 
			  && s.find("the") ==string::npos
			  && s.find("this") ==string::npos) 
			 && c<26){
			for (int i = 0; i < s.length(); ++i){
				if(s[i]<'z' && s[i] >='a') s[i]++;
				if(s[i]=='z') s[i]='a';
			}
		    
			c++;
		}
		cout<<s<<endl;
	}
    return 0;
}

C++: #include<string>
#include<iostream>
#include<algorithm>
using namespace std;
string henkan(string a)
{
	for (unsigned int i = 0; i < a.size(); i++)
	{
		if (a[i] != ' '&&a[i] != '.'&&a[i]!='\n')
		{
			if (a[i] == 'z')a[i] = 'a';
			else 
				a[i] += 1;
		}
	}
	return a;
}
bool check(string a)
{
	string x[3] = { "the", "this", "that" };
	for (int i = 0; i < 3; i++)
	{
		if (a.find(x[i], 0) != string::npos)return false;
	}
	return true;
}
int main()
{
	
	string a, b;
	cin >> b;
	a.append(b);
	while (getline(cin,b))
	{
		a.append(b);
		a.append("\n");
	}
	while (check(a))
	{
		a = henkan(a);
	}
	cout << a << endl;
	
}