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 <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
#include <vector>

using namespace std;
int main(){
	string str1;
	int i, j, n = 0;
	while(getline(cin, str1)){
		bool change = false;
		for(i = 0;i < 26;i++){
			for(j = 0;j < str1.size();j++){
				if(str1[j] != ' ' && str1[j] != '.'){
					str1[j] -= 1;
				}
			}
			for(j = 0;j+3 < str1.size();j++){
				if(str1[j] == 't' && str1[j+1] == 'h'){
					if(str1[j+2] == 'e' || (str1[j+2] == 'i' && str1[j+3] == 's') || (str1[j+2] == 'a' && str1[j+3] == 't')){
						n = i + 1;
						change = true;
						break;
					}
				}
			}
			if(change) break;
		}	
		for(i = 0;i < str1.size();i++){
			cout << str1[i];
		}
		cout << endl;
	}


	return 0;
}

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

using namespace std;

const string LIST[3] = {"the", "this", "that"};

bool judge(string);

int main(void){
	for(string input; getline(cin, input); cout << input << endl){
		for(int i = 0; i < 25; i ++){
			if(judge(input)) break;
			for(int j = 0; j < input.length(); j ++){
				if('a' <= input[j] && input[j] <= 'z')
					input[j] = (input.at(j) != 'z') ? input.at(j) + 1: 'a';
			}
		}
	}

	return 0;
}

bool judge(string input){
	istringstream iss(input);
	do{
		string sub;
		iss >> sub;
		for(int i = 0; i < 3; i ++)
			if(sub == LIST[i]) return true;
	} while(iss);

	return false;
}

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

using namespace std;

char Shift(int, char);

int main(){
  int i, n;
  string str, _str;
  string The = "the", This = "this", That = "that";
  string::iterator iter1, iter2, iter3;

  while(getline(cin, str)){
    n=1;
    while(1){
      _str = str;
      for(i=0; i<_str.size(); i++)
	_str[i] = Shift(n, _str[i]);

      iter1 = search(_str.begin(), _str.end(), The.begin(), The.end());
      iter2 = search(_str.begin(), _str.end(), This.begin(), This.end());
      iter3 = search(_str.begin(), _str.end(), That.begin(), That.end());

      if(iter1 != _str.end() || iter2 != _str.end() || iter3 != _str.end())
	break;

      n++;
    }

    cout << _str << endl;
  }

  return 0;
}

char Shift(int n, char c){
  int x;
  if(c >= 'a' && c <= 'z'){
    x = c + n;
    if(x > 122) x -= 26;
    c = x;
  }
  return c;
}

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 str[1000];
	int num=0;
	int k=0;
	while(cin>>str[k]){
		for(int j=0;j<26;j++){
			string str2 = str[k];
			for(int i=0;i<str2.size();i++){
				int cnt=j;
				while(cnt){
					if(str2[i]=='a'){
						str2[i]='z';
					}else{
						str2[i]--;
					}
					cnt--;
				}
			}
//			if(k==0) cout<< str2<<endl;
			if(str2=="the" || str2=="this" || str2=="that"){
				num = j;
				break;
			}
		}
		k++;
	}
	for(int j=0;j<k;j++){
		for(int i=0;i<str[j].size();i++){
			int cnt = num;
			while(cnt){
				if(str[j][i]=='.'){
				}else if(str[j][i]=='a'){
					str[j][i]='z';
				}else{
					str[j][i]--;
				}
				cnt--;
			}
		}
		cout<<str[j];
		if(j!=k-1){
			cout<<" ";
		}else{
			cout<<endl;
		}
	}
	
	return true;
}

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

	return 0;
}

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

using namespace std;

#define REP(i,a,b) for((i)=(a);(i)<(int)(b);(i)++)
#define rep(i,n) REP(i,0,n)
// BEGIN CUT HERE
#define foreach(itr,c) for(typeof((c).begin()) itr=(c).begin();itr!=(c).end();itr++)
template<class T> inline string toString(T x){ostringstream sout;sout<<x;return sout.str();}
// END CUT HERE

int main(){
  int i, j, c;
  string str;

  while(getline(cin,str)){
    int N = str.size();

    rep(c,26){
      rep(i,N) if(str[i] != '.' && str[i] != ' '){
          str[i]--;
          if(str[i] < 'a') str[i] = 'z';
      }
 
      rep(i,N){
        if(str.find("this") != -1 || str.find("the") != -1 || str.find("that") != -1){
          cout << str << endl;
          return 0;
        }
      }
    }
  }

  return 0;
}

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

using namespace std;

int main(int argc, char *argv[]) {
  string str, copy;
  int shif;
  vector<string> result;
  while (getline(cin, str)) {
    copy = str;
    shif = -1;
    while (true) {
      if (str.find(" this ") != string::npos ||
          str.find(" that ") != string::npos ||
          str.find(" the ") != string::npos)
        break;
      else
        for (string::iterator itr = str.begin();
             itr != str.end();
             itr++)
          if ('a' <= *itr && *itr <= 'z') {
            *itr += shif;
          } else if (*itr != '.' && *itr != ' ' &&
                     *itr != '\n') {
            str = copy;
            shif = 1;
            break;
          }
    }
    result.push_back(str);
  }

  for (int i = 0; i < result.size(); i++)
    cout << result[i] << endl;
  return 0;
}

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

using namespace std;

void forward(string& data)
{
	for(auto& c : data)
	{
		if(c < 'a' || 'z' < c)
			continue;

		c++;
		if('z' < c)
			c -= 26;
	}
}

bool test(const string& data)
{
	if(data.find("the") != string::npos)
		return true;
	if(data.find("this") != string::npos)
		return true;
	if(data.find("that") != string::npos)
		return true;

	return false;
}

int main()
{
	while(!cin.eof())
	{
		char buffer[1024];
		cin.getline(buffer, 1024);
		string line(buffer);

		for(int i = 0; i < 26; i++)
		{
			if(test(line))
				break;
			forward(line);
		}

		cout << line << endl;
	}

	return 0;
}