Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

C++: //解けていない





//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  int n;
  string str;
  
  getline(cin, str);

  for(int i = 0; i < str.size(); i++) {
    for(int j = 0; str[i]+j <= 'z'; j++) {
      if(str[i] + j == 't' && str[i] + j+1 == 'h') {
	n = j;
	break;
      }
    } 
    for(int j = 0; str[i]-j >= 'a'; j++) {
      if(str[i] - j == 't' && str[i] - j+1 == 'h') {
	n = j;
	break;
      }
    }
  }
  
  for(int i = 0; i < str.size(); i++) {
    if(str[i] == ' ' || str[i] == '.') printf("%c", str[i]);
    else printf("%c", str[i]+n);
  }
  cout << endl;
}

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;
	}
}