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 <bits/stdc++.h>
using namespace std;

//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,v) for(auto &(itr):(v))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define ln '\n'
#define bln(i,n) (((i)==(n)-1)?'\n':' ')
#define dbg(x) cout<<#x" = "<<(x)<<ln<<flush
#define dbga(x,n) {cout<<#x" : ";for(int (i)=0;i<(n);++i){cout<<((x)[i])<<(i==((n)-1)?'\n':' ')<<flush;}}
#define zero(a) memset(a,0,sizeof(a))
#define unq(a) sort(all(a)),a.erase(unique(all(a)),a.end())

typedef complex<double> P;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const ll inf = (ll)1e9+10;
const ll linf = (ll)1e18+10;
const ll mod = (ll)(1e9+7);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;

ll mop(ll a,ll b,ll m=mod) {ll r=1;a%=m;for(;b;b>>=1){if(b&1)r=r*a%m;a=a*a%m;}return r;}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}
bool ool(int x,int y,int h,int w) {return((x<0)||(h<=x)||(y<0)||(w<=y));}
bool deq(double a,double b) {return abs(a-b)<eps;}

struct oreno_initializer {
	oreno_initializer() {
		cin.tie(0);
		ios::sync_with_stdio(0);
	}
} oreno_initializer;

// ━━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…
// .｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋.｡.:( ^ω^)・ﾟ＋
// ・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・‥…━━━☆・

typedef string::const_iterator S;
string s;

//(t.size()>=3 && t.substr(0,3)=="the") || (t.size()>=4 && (t.substr(0,4)=="that" || t.substr(0,4)=="this"))

bool ok(S &i, S &e) {
	if (i==e) return 0;
	string t;
	while (*i!=' ') t.pb(*i), i++;
	if (t=="the" || t=="this" || t=="that") return 1;
	return ok(++i,e);
}

signed main() {
	while (1) {
		getline(cin,s);
		s.pb(' ');
		rep(i,26) {
			S b = s.begin(), c = s.end();
			if (ok(b,c)) {
				cout << s << ln << flush;
				break;
			}
			rep(j,s.size()) if ('a'<=s[j] && s[j]<='z') {
				s[j]++;
				if (s[j]>'z') s[j] = 'a';
			}
		}
	}
}

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

/*void shift(std::string str){
  for(int i=0;i<str.size();i++){
    if('a'<=str[i]&&str[i]<='z'){
      str[i] += 1;
      if(str[i]==123){
        str[i]='a';
      }
    }
  }
}*/

int main(){
  std::string str;
  int flag;

  while(std::getline(std::cin, str)){
    //str[0] += 1;
    //std::cout << str << std::endl;
    flag = 1;
    while(flag){
      //shift(str);
      //std::cout << str << std::endl;
      for(int i=0;i<str.size();i++){
        if('a'<=str[i]&&str[i]<='z'){
          str[i] += 1;
          if(str[i]==123){
            str[i]='a';
          }
        }
      }

      if(!(str.find("this")==std::string::npos)){
        flag = 0;
      }
      if(!(str.find("that")==std::string::npos)){
        flag = 0;
      }
      if(!(str.find("the")==std::string::npos)){
        flag = 0;
      }
    }
    std::cout << str << std::endl;
  }
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
typedef pair<int,char*> str;

int main(void){
	char s[81];
	vector<str> v;
	const char* cmp1="that";
	const char* cmp2="this";
	const char* cmp3="the";
	bool is_found=false;
	int pos=0,end_pos,diff;
	char c;

	scanf("%[^\n]",s);
	for(int i=0;i<81;i++){
		if(s[i]==' ' || s[i]=='.'){
			c=s[i];
			s[i]='\0';
			v.push_back(str(i-1-pos,s+pos));
			s[i]=c;
			pos=i+1;
		}else if(s[i]=='\0'){
			end_pos=i;
			break;
		}
	}

	for(int i=0;i<v.size();i++){
		is_found=false;

		diff=1000;
		if(v[i].first==4){
			for(int j=0;j<4;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp1[j];
				}else if(diff!=v[i].second[j]-cmp1[j]){
					is_found=true;
					break;
				}
			}

			if(!is_found) break;

			diff=1000;
			for(int j=0;j<4 && !is_found;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp2[j];
				}else if(diff!=v[i].second[j]-cmp2[j]){
					is_found=true;
					break;
				}
			}

			if(!is_found) break;
		}else if(v[i].first==3){
			diff=1000;
			for(int j=0;j<3;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp2[j];
				}else if(diff!=v[i].second[j]-cmp2[j]){
					is_found=true;
					break;
				}
			}
			if(!is_found) break;
		}
	}
	
	for(int i=0;i<end_pos;i++){
		if(s[i]!=' ' && s[i]!='.'){
			s[i]-=diff;
		}
	}

	printf("%s\n",s);


	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (s.empty()) break;
        while (s.find("the") == string::npos && s.find("this") == string::npos && s.find("that") == string::npos) f(s);
        cout << s << endl;
    }
}

C++: #define scanf_s scanf
#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 81
#define _MAX 100
#define ABC 26
int main(void)
{
	int n, s = 0, x, y, r = 0, a, b;
	int sum_n[50][3] = { 0 };
	char sum[50][_MAX], str[_MAX], bstr[_MAX], num[11] = { "0123456789" };
	//
	while(gets_s(str) != NULL){
		for (int i = 0; str[i] != '\0'; ++i) {
			if (str[i] - 't' == str[i + 1] - 'h') {
				a = str[i] - 't';
				if ((str[i + 2] - a + 'z') % 'z' == 'e') { b = a; break; }
				else if ((str[i + 2] - a + 'z') % 'z' == 'i' + ABC && (str[i + 3] - a + 'z') % 'z' == 's') { b = a; break; }
				else if ((str[i + 2] - a + 'z') % 'z' == 'a' + ABC && (str[i + 3] - a + 'z') % 'z' == 't') { b = a; break; }
			}
		}
		for (int i = 0; str[i] != '\0'; ++i) {
			if ('a' <= str[i] && str[i] <= 'z') {
				printf("%c", (str[i] - a + 'z') % 'z');
			}
			else { printf("%c", str[i]); }
		}
		printf("\n");
	}
}