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 <cstdio>
#include <vector>
#include <algorithm>
#include <regex>
#include <cctype>
#include <string>
#include <utility>
using namespace std;

vector<string> v;

vector<string> split(string&& s, regex&& pattern) {
    sregex_token_iterator first(s.begin(), s.end(), pattern, -1);
    sregex_token_iterator last;
    return(vector<string>(first, last));
}

bool cheser() {
    for(int r = 1; r <= 26; r++) {
        bool found = false;
        for(int c = 0; c < v.size(); c++) {
            for(int k = 0; k < v[c].length(); k++) {
                if(!isalpha(v[c][k])) continue;
                int now = v[c][k] - 'a';
                now = (now+1)%26;
                v[c][k] = 'a' + now;
            }
            if(v[c] == "the" || v[c] == "this" || v[c] == "that") found = true;
        }
        if(found) return(true);
    }
    return(false);
}

int main(void) {
    string input;
    while(getline(cin, input)) {
        v = split(move(input), regex(" "));
        cheser();
        for(int r = 0; r < v.size(); r++) {
            cout << v[r];
            if(r == v.size() - 1) cout << endl;
            else                  cout << " ";
        }
    }
    
    return(0);
}

C++: #include<iostream>
#include<string>
#include<vector>
using namespace std;
char CaesarChar(char );
string CaesarString(string s);
vector<string> CaesarVector(vector<string> v);
vector<string> SolveCaesar(vector<string> v);
int main() {
  string s;
  while( getline(cin,s)) {  
    vector<string> array;
    int space=0;
    int next_space=0;    
    for(int i=0;i<(int)s.size();i++) {
      if(s[i]== ' '){
	next_space=i;
	string tmp="";
	for(int j=space;j<next_space;j++)
	  tmp+=s[j];
	space=next_space+1;
	array.push_back(tmp);
      }
    }
    string tmp="";
    for(int i=next_space+1;i<(int)s.size();i++) 
      tmp+=s[i];
    array.push_back(tmp);
    vector<string> answer=SolveCaesar(array);
    for(int i=0;i<(int)answer.size();i++){
      cout<<answer[i];
      if(i!=(int)answer.size()-1)
	cout<<" ";
    } 
    cout<<endl;
  }
  return 0;
}
char CaesarChar(char c) {
  if(c=='z')
    return 'a';
  if(int('a')<=int(c) && int(c)<int('z'))
  return char(c+1);
  return c;
}
string CaesarString(string s) {
  string tmp="";
  for(int i=0;i<(int)s.size();i++)
    tmp+=CaesarChar(s[i]);
  return tmp;
}
vector<string> CaesarVector(vector<string> v) {
  vector<string> tmp;
  for(int i=0;i<(int)v.size();i++) 
    tmp.push_back(CaesarString(v[i]));
  return tmp;
}
vector<string> SolveCaesar(vector<string> v) {
  for(int i=0;i<(int)v.size();i++) {
    if(v[i]=="the" || v[i]=="this" || v[i]=="that")
      return v;
  } 
  return SolveCaesar(CaesarVector(v));
}

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


std::vector<std::string> split(const std::string &s, char delim) {
	std::vector<std::string> elems;
	std::stringstream ss(s);
	std::string item;
	while (std::getline(ss, item, delim)) {
		if (!item.empty()) {
			elems.push_back(item);
		}
	}
	return elems;
}

int main() {
	std::string input;
	while (std::getline(std::cin, input)) {
		std::vector<std::string> words;
		bool isPeriod = false, isCipher = false;
		if (*(input.rbegin()) == '.') {
			input.pop_back();
			isPeriod = true;
		}
		words = split(input, ' ');
		for (int i = 0; i < 26; i++) {
			for (std::vector<std::string>::iterator itr = words.begin(); itr != words.end(); itr++) {
				for (std::string::iterator sitr = (*itr).begin(); sitr != (*itr).end(); sitr++) {
					*sitr = ((*sitr - 'a' + 1) % 26) + 'a';
				}
				if (*itr == "the" || *itr == "this" || *itr == "that") {
					isCipher = true;
				}
			}
			if (isCipher) break;
		}
		std::string output = "";
		for (std::vector<std::string>::iterator itr = words.begin(); itr != words.end(); itr++) {
			if (output != "") output += " ";
			output += *itr;
		}
		if (isPeriod) output += ".";
		std::cout << output << std::endl;
	}
}

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

using namespace std;

int main(int argc, char *argv[]) {
  string str, copy;
  int shif;
  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;
        }
  }


  cout << str << endl;
  return 0;
}

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

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <cstring>
#include <string>
#include <cctype>
#include <sstream>

using namespace std;

#define reep(i,f,n) for(int i=f; i<int(n); ++i)
#define rep(i,n) reep(i,0,n)

typedef vector<int> vi;

int main()
{
	char str[81];
	while(fgets(str, 81, stdin) != NULL){
		stringstream sstr(str);
		vector<string> words;

		string tmp;
		while(sstr >> tmp)
			words.push_back(tmp);

		rep(i, 26){
			rep(j, words.size()){
				if(words[j] == "the" || words[j] == "this" || words[j] == "that"){
					rep(k, strlen(str))
						putchar(isalpha(str[k]) ? (str[k]-'a'+i)%26+'a' : str[k]);
					//puts("");
					i = 26;
					break;
				}

				rep(k, words[j].size())
					words[j][k] = (words[j][k]-'a'+1)%26 + 'a';
			}
		}
	}

	return 0;
}

C++: #include<iostream>
#include<sstream>
#include<fstream>
#include<cstdio>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<string>
#include<map>
#include<set>
#include<algorithm>
#include<cmath>
#include<cstdlib>
using namespace std;

string resolve(string org,int ch){
	string ret = "";
	for(int x=0;x<org.size();++x){
		if(org[x]==' ' || org[x]=='.'){
			ret += org[x];
		}else if(org[x]+ch<'a'){
			ret += 'z' - ('a'-(org[x]+ch)-1);
		}else if(org[x]+ch>'z'){
			ret += 'a' +(org[x]+ch-'z'-1);
		}else{
			ret += org[x]+ch;
		}	
	}
	return ret;
}

vector<string> tokens(string line){
	vector<string> ret;
	int b=0;
	string tmp= "";
	while(line[b]!=0){
		if(line[b]==' '){	
			if(tmp.size()>0){
				ret.push_back(tmp);
			}
			tmp = "";
		}else{
			tmp += line[b];
		}
		++b;
	}
	if(tmp.size()>0){
		ret.push_back(tmp);
	}
	return ret;
}

string solve(string line){
	vector<string> tok = tokens(line);
	int ch = 0;
	for(int x=0;x<tok.size();++x){
		if(tok[x].size()==3 || tok[x].size()==4){
			int tmp = 't'-tok[x][0];
			if(tmp>0){
				tmp = -7-tok[x][0]+'a';
			}
			string sol = resolve(tok[x],tmp);
			if(sol=="the" || sol =="that" || sol=="this"){ch = tmp;break;}
		}
	}
	return resolve(line,ch);
}

int main(){
	string line;
	while(getline(cin,line)){
		if(line=="")break;
		cout<<solve(line)<<endl;
	}
	return 0;
}