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++: // clang-format off

#include <bits/stdc++.h>

#define int long long int
#define main signed main()
#define bye return 0
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define each(p, v) for (auto p = (v).begin(); p != (v).end(); p++)
#define all(v) (v).begin(), (v).end()
#define prec(n) fixed << setprecision(n)
#define dump(x) cerr << "(L" << __LINE__ << ") " << #x << " = " << (x) << endl
#define clr(x, a) memset(x, a, sizeof(x))

#define stlice(from, to) substr(from, (to) - (from) + 1)
#define odd(n) ((n) % 2)
#define even(n) (!odd(n))

#define INF 1000000000
#define INFLL 1000000000000000000LL
#define MOD 1000000007
#define PI acos(-1)

#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define vi vector<int>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define pii pair<int, int>

using namespace std;

// clang-format on

string f(string s) {
  rep(i, s.size()) {
    if ('a' <= s[i] && s[i] <= 'z') {
      s[i] = (s[i] - 'a' + 1) % ('z' - 'a') + 'a';
    }
  }
  return s;
}

main {
  string s;
  while (getline(cin, s)) {
    vs w;
    stringstream ss;
    ss << s;
    string x;
    while (ss >> x) {
      w.pb(x);
    }
    for (;;) {
      bool b = false;
      rep(i, w.size()) {
        string d = f(w[i]);
        b |= d == "the" || d == "this" || d == "that";
        w[i] = d;
      }
      if (b) {
        break;
      }
    }
    cout << w[0];
    loop(i, 1, w.size()) cout << ' ' << w[i];
    cout << endl;
  }
}

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

bool contains(string s, string t) {
  return s.find(t) != string::npos;
}

int main() {
  string s;
  while (getline(cin, s)) {
    for (int i = 0; i < 26; i++) {
      for (int j = 0; j < s.length(); j++) {
        if (s[j] >= 'a' && s[j] <= 'z') {
          if (s[j] == 'z') s[j] = 'a';
          else s[j]++;
        }
      }
      if (contains(s, "the") || contains(s, "this") || contains(s, "that"))
        break;
    }
    cout << s << endl;
  }  
}

C++: # include <iostream>
# include <algorithm>
# include <vector>
# include <string>
# include <set>
# include <map>
# include <cmath>
# include <iomanip>
# include <functional>
# include <utility>
# include <stack>
# include <queue>
# include <list>
# include <bitset>
# include <complex>
# include <numeric>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
constexpr long long MOD = 1000000000 + 7;
constexpr int INF = 2000000000;
constexpr int HINF = INF / 2;
constexpr double DINF = 100000000000000000.0;
constexpr long long LINF = 9223372036854775807;
constexpr long long HLINF = 4500000000000000000;
const double PI = acos(-1);

int main() {
	string s;
	getline(cin, s);
	for (int i = 0; i < s.size(); i++) {
		if (!('a' <= s[i] && s[i] <= 'z')) {
			cout << s[i];
			continue;
		}
		if (s[i] == 'z')cout << 'a';
		else cout << char(s[i] + 1);
	}
	cout << endl;
	//system("pause");
}

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

using namespace std;

string answer;

bool saiki( int advance, string target )
{
	for( int i = 0;i < target.size();i++ ){
		if( target[i] >= 'a' && target[i] <= 'z' ){target[i]+=advance; if( target[i] < 'a' || target[i] > 'z' ) return false;}
	}
	if( target.find( "the" ) != string::npos || target.find( "that" ) != string::npos || target.find( "this" ) != string::npos ){ answer = target;return true;  }
	else return saiki( advance, target );
}

int main(int argc, char const* argv[])
{
	string str;

	while( getline( cin, str ) ){
		if( str.find( "the" ) != string::npos || str.find( "that" ) != string::npos || str.find( "this" ) != string::npos ){ cout << str << endl;continue; }
		if(saiki( 1 ,str )){
			cout << answer << endl;
			continue;
		}
		if( saiki( -1 , str ) ){
			cout << answer << endl;
			continue;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<queue>
#include<cstdio>
#include<string>
using namespace std;
int main()
{
//    freopen("test.txt", "r", stdin);
 //   freopen("testout.txt", "w", stdout);
    string temp, ans;
    string guanjian[3] = { "this","the","that" };
    while (getline(cin, temp))
    {
        ans = temp;
        for (int i = 0; i <= 'z' - 'a'; i++)
        {
            //表示位移量。
            for (int j = 0; j<temp.size(); j++)
            {
                if (temp[j] >= 'a'&&temp[j] <= 'z')
                    ans[j] = (temp[j] - 'a' + i) % ('z' - 'a') + 'a';
                else ans[j]=temp[j];
            }
            if (ans.find(guanjian[0])!= string::npos ||
                    ans.find(guanjian[1]) != string::npos ||
                    ans.find(guanjian[2]) != string::npos)
            {
                cout << ans << endl;
                break;
            }
        }
    }
    return 0;
}