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++: //C++14 (Clang 3.8.0)

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#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 <ctime>
#include <string>
#include <climits>
using namespace std;
typedef long long ll;
typedef pair<long long,long long> P;

bool judge(string s1,int x){
  for(int i=0;i<s1.size();i++){
    if((int)s1[i]+x>122 or (int)s1[i]+x<97) return false;
  }
  if (s1.size()==4){
    if((char)((int)s1[0]+x)=='t' and (char)((int)s1[1]+x)=='h' and (char)((int)s1[2]+x)=='a' and (char)((int)s1[3]+x)=='t') return true;
    if((char)((int)s1[0]+x)=='t' and (char)((int)s1[1]+x)=='h' and (char)((int)s1[2]+x)==    'i' and (char)((int)s1[3]+x)=='s') return true;
  }
  if (s1.size()==3){
    if((char)((int)s1[0]+x)=='t' and (char)((int)s1[1]+x)=='h' and (char)((int)s1[2]+x)==    'e') return true;
  }
  return false;
}
int main(){
  vector<string> v;
  while(1){
    string s;
    cin>>s;
    if(s[s.size()-1]=='.'){
      string tmp="";
      for (int i=0;i<s.size()-1;i++){
        tmp+=s[i];
      }
      v.push_back(tmp);


      break;
    }
    v.push_back(s);
  }
  int ans=10000;
  for (int i=0;i<v.size();i++){
    for(int j=-123;j<123;j++){
      if(judge(v[i],j)){
        ans=j;
        break;
      }
    }
  }
  for(int i=0;i<v.size();i++){
    for (int j=0;j<v[i].size();j++)cout<<(char)(v[i][j]+ans);
    cout<<" ";
  }
  cout<<"."<<endl;
      
}

C++: #include<iostream>
#include<string>
using namespace std;
bool isAlpha(char ch){
  return ('a'<=ch&&ch<='z');
}
string change(string str){
  for(int i=0;i<(int)str.size();i++){
    if(isAlpha(str[i])){
      if(str[i]=='z')str[i]='a';
      else str[i]++;
    }
  }
  return str;
}
string st(string str,int x,int y){
  string res="";
  for(int i=x;i<x+y;i++)res.push_back(str[i]);
  return res;
}
int main(){
  string str;
  string a ="abcdefghi";
  int flg;
  while(getline(cin,str)){
    flg=0;
    for(int i=0;i<26;i++){
      str=change(str);
      for(int j=0;j+3<=(int)str.size();j++)
	if(st(str,j,3)=="the")flg=1;
      if(flg)break;
      for(int j=0;j+4<=(int)str.size();j++)
	if(st(str,j,4)=="this")flg=1;
      if(flg)break;
      for(int j=0;j+4<=(int)str.size();j++)
	if(st(str,j,4)=="that")flg=1;
      if(flg)break;
    }
    cout<<str<<endl;
  }
  
  return 0;
}

C++: #include<iostream>
#include<cstring>
#include<cstdio>
using namespace std;
int main(){
	int f = 0,i;
	for(;;){
		char word[100]={0};
		for(i=0;;i++){
			if(scanf("%c",&word[i]) == EOF){f = 1; break;}
			if(word[i] == 10){break;}
		}
		for(;;){
			for(i=0;i<(int)strlen(word);i++){
				if(word[i] == 't' && word[i+1] == 'h' && word[i+2] == 'i' && word[i+3] == 's'){break;}
				else if(word[i] == 't' && word[i+1] == 'h' && word[i+2] == 'a' && word[i+3] == 't'){break;}
				else if(word[i] == 't' && word[i+1] == 'h' && word[i+2] == 'e'){break;}
			}
			if(i != (int)strlen(word)){cout<<word;break;}
			for(i=0;i<(int)strlen(word);i++){
				if(word[i]==122){word[i]=97;}
				else if(word[i]>=97 && word[i]<122){word[i]++;}
			}
		}
		if(f == 1){break;}
	}
	return 0;
}

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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define sumvec(v) accumulate(all(v),0LL)
#define mapmin(v) v.rbegin()->first
#define mapmax(v) v.begin()->first
#define pb push_back
#define pf push_front
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK cerr<<"OK\n"
#define OK1 cerr<<"OK1\n"
#define OK2 cerr<<"OK2\n"
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n
#define endl '\n'

typedef long long ll;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;

typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

const double pi = acos(-1.0);
const ll mod=1000000007;
const ll mod2=998244353;

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

template<class T>
inline bool chmax(T& a, T b){if(a<b){a=b;return true;} return false;}

template<class T>
inline bool chmin(T& a, T b){if(a>b){a=b;return true;} return false;}

void YES(bool b) {cout << ((b)?"YES\n":"NO\n");}
void Yes(bool b) {cout << ((b)?"Yes\n":"No\n");}
void yes(bool b) {cout << ((b)?"yes\n":"no\n");}
void Yay(bool b) {cout << ((b)?"Yay!\n":":(\n");}

ll powmod(ll a,ll b){ll c=1; while(b>0){ if(b&1){ c=a*c%mod; } a=a*a%mod; b>>=1; } return c;}
ll nCrmod(ll n,ll r){ll x=1,y=1; rep(i,r){x=x*(n-i)%mod; y=y*(i+1)%mod;} return x*powmod(y,mod-2)%mod;}
ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

int main()
{
	string s;
	while(getline(cin,s)){
		ll n=s.length();
		while(1){
			if(s.find("this")!=string::npos) break;
			if(s.find("that")!=string::npos) break;
			if(s.find("the")!=string::npos) break;
			rep(i,n){
				if(s[i]!=' ' && s[i]!='.'){
					if(s[i]=='z') s[i]='a';
					else s[i]++;
				}
			}
		}
		cout << s << endl;
	}
	return 0;
}