Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if reflect.DeepEqual(infos, []string{}) {
			break
		}
		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.substr(0, 3) == "the" || d.substr(0, 4) == "this" ||
             d.substr(0, 4) == "that";
        w[i] = d;
      }
      if (b) {
        break;
      }
    }
    cout << w[0];
    loop(i, 1, w.size()) cout << ' ' << w[i];
    cout << endl;
  }
}

C++: #include <iostream>
#include <cstring>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <map>
using namespace std;
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,b) FOR(i,0,b)
#define PB push_back
#define MP make_pair
int main(){
  string s;
  getline(cin,s);
  for(int i=0;i<26;i++){
    if(s.find("the")!=string::npos)break;
    if(s.find("that")!=string::npos)break;
    if(s.find("this")!=string::npos)break;
    for(int i=0;i<s.size();i++){
      if(!isalpha(s[i]))continue;
      s[i]++;
      if(s[i]>'z')s[i]-=26;
    }
  }
  cout<<s<<endl;
}

C++: #include <iostream>
#include <string>
using namespace std;
string rot(string s, int n){
	for(int i = 0; s[i] != '\0'; i++){
		if(s[i] >= 65 && s[i] <= 90) s[i] = (s[i] - 65 + n) % 26 + 65;
		else if(s[i] >= 97 && s[i] <= 122) s[i] = (s[i] - 97 + n) % 26 + 97;
	}
	return s;
}
// the this that
string text[3] = {"the", "this", "that"};
int main(){
	string line;
	while(getline(cin, line)){
		for(int i = 0; i < 26; i++){
			line = rot(line, 1);
			if(line.find(text[0], 0) != string::npos || line.find(text[1], 0) != string::npos || line.find(text[2], 0) != string::npos){
				cout << line << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
main(){
	string str;
	int tmp,b;
	while(getline(cin,str)){
		tmp='t'-str[0];
		for(int i=0;i<str.size();++i){
			if(str[i]>='a' && str[i]<='z'){
				if(str[i]>='r')str[i]-=26;
				str[i]+=tmp;
				if(str[i]<'a')str[i]+=26;
				else if(str[i]>'z')str[i]-=26;
			}
		}
		string str2="    ";
		for(int i=0;i<=3,i<=3;++i)str2[i]=str[i];
		//if(str2=="this" || str2=="the " || str2=="that")
		cout<<str<<endl;
	}
}

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

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c + 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++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;

int main(){

  string s;
  int k = 0;

  getline(cin,s);

    for(int i=-25;i<26;i++){
      if(s[0]+i == 't' && s[1]+i == 'h'){
	if(s[2]+i == 'e') k = i;
	if(s[2]+i == 'i' && s[3]+i == 's') k = i;
	if(s[2]+i == 'a' && s[3]+i == 't') k = i;
      }
    }

    for(int i=0;i<s.size();i++){
      if(s[i] <= 'z' && s[i] >= 'a') cout << (char)(s[i]+k);
      else cout << s[i];
    }

    cout << endl;

}

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

using namespace std;

void solve()
{
	string s;
	while(getline(cin, s))
	{
		for(int i = 0; i < 26; ++i)
		{
			for(int j = 0; j < s.size(); ++j)
			{
				if(s[j] >= 'a' && s[j] <= 'z')
				{
					if(s[j] == 'z')
					{
						s[j] = 'a';
					}
					else
					{
						++s[j];
					}
				}
			}
			unsigned int pos1 = s.find("this");
			unsigned int pos2 = s.find("the");
			unsigned int pos3 = s.find("that");
			if(pos1 != string::npos || pos2 != string::npos || pos3 != string::npos)
			{
				cout << s << endl;
				break;
			}
		}
	}
}

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

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

using namespace std;

string decipher (const string& s_, int n) {
    string s = s_;
    for (int i = 0; i < s.size(); i++) {
        if ('a' <= s[i] && s[i] <= 'z') {
            int c = (int)s[i] + n;
            if (c > (int)'z') {
                c = c - (int)'z' + (int)'a' - 1;
            }
            s[i] = (char)c;
        }
    }
    return s;
}

bool test (const string& s) {
    if ((int)s.find("the")  != -1) return true;
    if ((int)s.find("this") != -1) return true;
    if ((int)s.find("that") != -1) return true;
    return false;
}

int main (void) {
    while (1) {
        string s, s_;
        getline(cin, s);
        if (cin.eof()) break;
        for (int i = 0; i < 26; i++) {
            s_ = decipher(s, i);
            if (test(s_)) {
                cout << s_ << endl;
                break;
            }
        }
    }
    return 0;
}