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<string>

using namespace std;

int main() {
	// the, this, thatの後はスペースと仮定する
	const string str_the("the "), str_this("this "), str_that("that ");
	string line;
	while (getline(cin, line)) {
		while (true) {
			auto result_the = line.find(str_the, 0);
			auto result_this = line.find(str_this, 0);
			auto result_that = line.find(str_that, 0);
			if (string::npos != result_the || string::npos != result_this
				|| string::npos != result_that) {
				break;
			}
			for (auto& x : line){
				char result;
				if (x >= 'a' && x < 'z') {
					++x;
				}
				else if (x == 'z') {
					x = 'a';
				}
			}
		}

		cout << line << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>

using namespace std;

void Solution()
{
    string a;
    
    while(getline(cin,a))
    {
        
        while (1)
        {
            if( a.find("this") != -1 || a.find("the") != -1 || a.find("that") != -1)
            {
                break;
            }
            
            for(int i = 0; i < (int)a.length(); i++)
            {
                if(a[i]==' '|| a[i]=='.')
                {
                    continue;
                }
                else if(a[i] == 'z') //based on ASC||code , after 'z' is '{'
                {
                    a[i] = 'a';
                }
                else
                {
                    a[i]++; // character would be changed based on ASC|| code
                }
            }
            
        }
        cout<<a<<endl;;
    }
}

int main()
{
    Solution();
    return 0;
}

C++: #include <iostream>
#include <cstdlib>
#include <string>
#include <cctype>
#include <algorithm>
using namespace std;

char cShiftchar(char ch)
{
    if(isalpha(ch))
    {
        ch++;
        if(ch > 'z') ch = ch - 'z' + 'a' -1;
    }

    return ch;
}

string sDecode(string str)
{
    string ans;
    while( str.find("the")
            && str.find("this")
            && str.find("that")
         )
    {
        transform(str.begin(), str.end(), str.begin(), cShiftchar);

    }
    return ans;
}

int main()
{
    string str;
    while(getline(cin, str))
    {
        cout << sDecode(str) << endl;
    }
    return EXIT_SUCCESS;
}

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;

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" || t=="the." || t=="this." || t=="that.") return 1;
	return ok(++i,e);
}

signed main() {
	getline(cin,s);
	s.pb(' ');
	rep(i,26) {
		S b = s.begin(), c = s.end();
		if (ok(b,c)) return cout << s << ln, 0;
		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>
#include <ctype.h>
using namespace std;

int main(){
    string before;
    while (getline(cin, before)) {
        int swich = 0;
        for (int i = 0; ; i++) {
            for (int j = 0; j < before.size(); j++) {
                if (before[j]>'z') {
                    before[j] = 'a';
                }
                else if (isalpha(before[j])) {
                    before[j]++;
                }
            }
            for (int j = 0; j < before.size(); j++) {
                if (before[j]=='t'&& before[j+1]=='h'&& before[j+2]=='e') {
                    swich = 1;
                    break;
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='a'&&before[j+3]=='t') {
                    swich = 1;
                    break;
                }
                else if (before[j]=='t'&&before[j+1]=='h'&&before[j+2]=='i'&&before[j+3]=='s') {
                    swich = 1;
                    break;
                }
            }
            if (swich == 1) {
                break;
            }
        }
        cout << before << endl;
    }
    return 0;
}

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

using namespace std;

int main()
{
    string s;
    getline(cin, s);
    for (char &c: s) {
        if (islower(c)) {
            c = (c - 4 + 'z') % 'z';
        }
        cout << c;
    }
    cout << endl;
    return 0;
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

string decode(string inp,int n){
    string in=inp;
    for(int i=0;i<in.length();i++){
        if(isalpha(in[i])){
            in[i]=in[i]-n;
            if(in[i]<'a') in[i]+=('z'-'b');
        }
    }
    return in;
}
bool check(string inp){
    stringstream words(inp);
    string word;
    while(getline(words, word, ' ')){
        if(word=="the"||word=="this"||word=="that"||word=="the."||word=="this."||word=="that.")
            return true;
    }
    return false;
}

int main(){
    string input;
    while(getline(cin,input)){
        for(int i=0;i<26;i++){
            input=decode(input,1);
            if(check(input)){
                break;
            }
        }
        cout << input << endl;
    }
    return 0;
}