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 <vector>
#include <algorithm>
#include <string>

using namespace std;

int main(){

	string sstr;
	while(1){
		getline(cin,sstr);
		if(cin.eof())
			break;

		string retStr;
		for(int i = 0; i < 26; i++){
			string str=sstr;
			if(i==4){
			//	cout<<endl;
			}
			for(int j = 0; j < str.size(); j++){
				if(str[j] >= 'a' && str[j] <= 'z'){
					str[j] = str[j] - i;
					if(str[j] < 'a'){
						str[j]+=26;
					}
				}
			}
			bool f=false;
			for(int j = 0; j + 2 < str.size(); j++){
				if(str.substr(j,3)=="the"){
					f=true;
					break;
				}
				else if(j+3<str.size()&& str.substr(j,4)=="this"){
					f=true;
					break;
				}
				else if(j+3<str.size()&&str.substr(j,4)=="that"){
					f=true;
					break;
				}
			}
			if(f){
				retStr=str;
				break;
			}
		}

		cout<<retStr<<endl;
	}

	return 0;
}

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

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

char sub(char ch){
	if(ch=='a')return 'z';
	else return ch-1;
}


bool solve(string s){
	string tmp="";
	rep(i,s.size()){
		if(isalpha(s[i])){
			tmp+=s[i];
		}
		else{

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

			tmp="";
		}
	}
	return false;
}

int main(){
	string s;
	while(getline(cin,s)){
		while(1){
			rep(i,s.size()){
				if(isalpha(s[i]))s[i]=sub(s[i]);
			}
			if(solve(s))break;
		}
		cout<<s<<endl;
	}
}

C++: #include <iostream>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <stdlib.h>

using namespace std;


int main(){
	string line;

	while(getline(cin, line)){
		int flag;

		for(int i=0 ; i<26 ; i++){
			for(int j=0 ; j<line.size() ; j++){
				if(line[j] != ' ' && line[j] != '.'){
					if(line[j] == 'a'){
						line[j] = 'z' ;
					}else{
						line[j]--;
					}
				}
			}

			for(int k=0 ; k<line.size()-2 ; k++){
				if(line[k] == 't' && line[k+1] == 'h'){
					flag = 1;
					cout << line << endl;
					break;
				}
			}
			if(flag == 1) break;
		}
		//cout << line << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
main(){
	string str;
	int tmp;
	while(getline(cin,str)){
		tmp=str[0]-'t';
		for(int i=0;i<str.size();++i){
			if(str[i]>='a' && str[i]<='z')str[i]-=tmp;
		}
		cout<<str<<endl;
	}
}

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

int main(){
	int i;
	string str;
	string strcp;
	string::iterator si;
	while(getline(cin, str)){
		strcp = str;
		for(i=0;i<num;i++){
			if(  strcp.find("this") != string::npos
			  || strcp.find("that") != string::npos
			  || strcp.find("the" ) != string::npos){
				cout << strcp << endl;
			}
			si = strcp.begin();
			while(si != strcp.end()){
				if('a' <= *si && *si <= 'y'){
					*si = *si + 1;
				}else if(*si == 'z'){
					*si = 'a';
				}
				si++;
			}
		}
	}
	return 0;
}

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

typedef pair<string, string> P;

P next_word(string sentence) {
  if (sentence.empty()) return make_pair(string(""), string(""));
  if (sentence[0] == ' ' || sentence[0] == '.') {
    return make_pair("", sentence.substr(1));
  } else {
    P recur = next_word(sentence.substr(1));
    return make_pair(sentence[0] + recur.first, recur.second);
  }
}

bool acceptable(string sentence) {
  P p = next_word(sentence);

  while (! p.first.empty() ) {
    if (p.first == "this" || p.first == "the" || p.first == "that")
      return true;

    p = next_word(p.second);
  }
  return false;
}

char slip(char c) {
  if (c < 'a' || 'z' < c) return c;
  
  string alphabet = "abcdefghijklmnopqrstuvwxyza";
  int index = (int)(c - 'a');
  return alphabet[index + 1];
}

char slip(char c, int n) {
  for (int i = 0; i < n; i++)
    c = slip(c);

  return c;
}

string slip(string code, int n) {
  string val;
  for (int i = 0, len = code.length(); i < len; i++)
    val += slip(code[i], n);

  return val;
}

string decode(string code) {
  for (int i = 1; i < 27; i++) {
    string sentence = slip(code, i);
    if (acceptable(sentence))
      return sentence;
  }

  return "";
}

int main() {
  string code;
  while ( getline(cin, code) )
    cout << decode(code) << endl;
}

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 <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)
#define all(a) (a).begin(), (a).end()

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

int main(){
	string s;
	while(getline(cin, s)){
		for(int j=0; j < 26; j++){
			for(int i=0; i< s.size(); i++){
				if('a' <= s[i] && s[i] < 'z')s[i]++;
				else if(s[i] == 'z') s[i] = 'a';
			}
			bool possible = false;
			if(s.find("the") != string::npos || s.find("this") != string::npos || s.find("that") != string::npos){
				cout << s << endl;
			}
		}
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

void caesar(char* a)
{
	for (int i=0; i<strlen(a); i++) {
		if (a[i] == ' ' || a[i] == '.') continue;
		else if (a[i] == 'z') a[i] = 'a';
		else a[i]++;
	}
}

int main()
{
	char buf[81];
	
	for (int k=0; k<20; k++) {
		fgets(buf, 80, stdin);
		int len = strlen(buf);
		for (int i=0; i<26; i++) {
			if ( (strstr(buf, "the") != NULL) || (strstr(buf, "this") != NULL) || (strstr(buf, "that") != NULL) ) {
				cout << buf << endl;
				break;
			}
			caesar(buf);
		}
	}
	
	return 0;
}