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 <string>
#include <sstream>
#include <iostream>
#include <algorithm>
using namespace std;

// determine whether it is "the","this" or "that"
char is_article(string w) {
	char sh = '\0'; // shift defaults to 0
	if (w.size() == 3) {
		sh = 't' - w.front();
		for_each(w.begin(),w.end(),[sh](char &c){c += sh;});
		if (w != "the") {
			sh = '\0';
		}
	} else if (w.size() == 4) {
		sh = 't' - w.front();
		for_each(w.begin(),w.end(),[sh](char &c){c += sh;});
		if (w != "this" && w != "that") {
			sh = '\0';
		}
	}
	return sh;
}

int main() {
	string s;
	while (getline(cin,s)) {
		istringstream stream(s);
		string w;
		char sh;
		while (stream >> w) {
			if ((sh = is_article(w)) != '\0') {
				break;
			}
		}
		for_each(s.begin(),s.end(),[sh](char &c){c += c >= 'a' && c <= 'z' ? sh : '\0';});
		cout << s << endl;
	}
}

C++: #include<iostream>
#include<string>
int main(){
	std::string str;
	while(std::getline(std::cin,str)){
	for(int i=0;i<str.size();i++){
		if(str[i]!=' ')str[i]+=1;
	}
	std::cout<<str<<std::endl;
	}
	return 0;
}

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

using namespace std;

int main(){
  string s;
  while(getline(cin,s)){
    for(int i=1;i<26;i++){
      string ans;
      for(string::iterator it=s.begin();it!=s.end();it++){      
	if(*it==' '||*it=='.'){
	  ans.push_back(*it);
	  continue;
	}
	ans.push_back((char)(((int)*it-0x61+i)%26+0x61));
      }
      if(ans.find("the")!=string::npos||ans.find("this")!=string::npos||ans.find("that")!=string::npos){
	cout<<ans<<endl;
	break;
      }
    }
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main(){
	string alpha = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string str;
	while( cin >> str, str ){
		getline( cin, str );
		for( int a = 0; a < 26; a++ ){
			for( int i = 0; i < str.length(); i++ ){
				for( int j = 0; j < alpha.length(); j++ ){
					if( str[i] == alpha[j] ){
						str[i] = alpha[j + 1];
						break;
					}
				}
			}
		/*char word = strtok( str.c_str(), " " );
		if( word == "the" || word == "that" || word == "this" ) break;
		while( word == NULL ){
			word = strtok( NULL, ' ' );
			if( word == "the" || word == "that" || word == "this" ) goto end;
		}*/
			if( str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos ){
				break;
			}
		}
		cout << str << endl;
	}
}

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

using namespace std;

void solve()
{
	string str;
	getline(cin, str);
	string word;
	int n = str.size();
	for(int j = 1; j < 26; ++j)
	{
		word.clear();
		for(int i = 0; i < n; ++i)
		{
			if('a' <= str[i] && str[i] <= 'z')
			{
				word += (str[i] + j -'a') % 26 + 'a';
			}
			else
			{
				word += str[i];
			}
		}
		if(word.find("this") != -1 || word.find("the") != -1 || word.find("that") != -1)
		{
			cout << word << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	string a;
	while(getline(cin,a)){
	int k=0;
	while(true){
		int check=0;
		if(k>26)
			break;
		for(int j=0;j<a.size();j++){
			if(isalpha(a[j])!=0)
				a[j]++;
			if(a[j]>'z')
				a[j]-=26;
		}
		for(int i=0;i<a.size()-2;i++){
			if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='e'&&check==0){
				for(int i=0;i<a.size();i++)
		            cout<<a[i];
	            cout<<endl;
				check=1;
			}
			if(a[i]=='t'&&a[i]=='h'&&a[i]=='i'&&a[i]=='s'&&check==0){
				for(int i=0;i<a.size();i++)
		            cout<<a[i];
	            cout<<endl;
				check=1;
			}
			if(a[i]=='t'&&a[i]=='h'&&a[i]=='a'&&a[i]=='t'&&check==0){
				for(int i=0;i<a.size();i++)
		            cout<<a[i];
	            cout<<endl;
				check=1;
			}
		}
		k++;
	}
	}
	return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

char ss[1024];
int n;

bool check()
{
	//the, this, that
	rep(i,n-4)
	{
		if(ss[i]=='t'&&ss[i+1]=='h'&&ss[i+2]=='i'&&ss[i+3]=='s') return true;
		if(ss[i]=='t'&&ss[i+1]=='h'&&ss[i+2]=='a'&&ss[i+3]=='t') return true;
		if(ss[i]=='t'&&ss[i+1]=='h'&&ss[i+2]=='e') return true;

	}
	return false;

}

void f()
{

	rep(i,n)
	{
		if(ss[i]=='\n') break;
		if(ss[i]==' '||ss[i]=='.') continue;
		char c=ss[i];
		c++;
		c-=19;
		c=c%26;
		ss[i]=(c+'a');
	}

}
int main()
{
	while(fgets(ss,sizeof(ss),stdin)!=NULL)
	{
		n=strlen(ss);
		//[97,122]
		//%97
	
		rep(i,26)
		{
			if(check())
			{
				printf("%s",ss);
				goto go;
			}
			f();
			//cout<<ss;
		}
go:;
	}
	
	return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

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

string rot(string s) {
  string r = "";
  rep (i, s.size()) {
    char c = s[i] < 'a' ? s[i]
           : s[i] == 'z' ? 'a' : char(s[i]+1);
    r += c;
  }
  return r;
}

bool ok(string s) {
  int a = s.find("the");
  int b = s.find("this");
  int c = s.find("that");
  return a != string::npos || b != string::npos || c != string::npos;
}

int main() {

  string s;
  while (getline(cin, s)) {
    while (!ok(s)) s = rot(s);
    cout << (s) << endl;
  }

  return 0;
}

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

int main()
{
	string s;

	while (getline(cin, s)) {
		for (int i = 0; i < 26; i++) {
			for (int j = 0; j < s.size(); j++) {
				if (s[j] >= 'a' && s[j] < 'z')
					s[j]++;
				else if (s[j] == 'z')
					s[j] = 'a';
			}

			if (s.find("the") != std::string::npos)
				break;
			if (s.find("this") != std::string::npos)
				break;
			if (s.find("that ") != std::string::npos)
				break;
		}

		cout << s << endl;
	}

	return 0;
}