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++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"


int main() {
	string st;
	vector<string>ths{ " the "," this "," that " };
	while (getline(cin, st)) {
		st.push_back(' ');
		st.insert(st.begin(), ' ');
		for (int i = 1; i < 26; ++i) {
			string nextst(st);
			for (auto&c : nextst) {
				int n = c - 'a';
				if (n < 0 || n >= 26)continue;
				n += i;
				n %= 26;
				c = 'a' + n;
			}
			bool ok = false;
			for (auto th : ths) {
				if (nextst.find(th) != -1)ok = true;
			}
			if (ok) {
				cout << nextst.substr(1,nextst.size()-2) << endl;
				break;
			}
		}
	}
	return 0;
}

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);
    }
    if (w.size() == 0) {
      continue;
    }
    for (bool b = false; !b;) {
      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;
      }
    }
    cout << w[0];
    loop(i, 1, w.size()) cout << ' ' << w[i];
    cout << endl;
  }
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<set>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<stack>
#include<list>
using namespace std;
#define inf 0x3f3f3f3f

char d[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};

int main(){
	char s[110];
	char c;
	int i=0;
	gets(s);
	int l = strlen(s),j,k,m,t;
	for(i=0;i<=26;i++){
		char t[110]={'a'};
		for(j=0;j<l;j++){
			if(s[j]>='a'&&s[j]<='z'){
				t[j] = d[(s[j]-'a'+i)%26];
			}
			else t[j] =s[j];
		}
		int a=0,b=0,c=0;
		for(j=0;j<l-2;j++){
			if(t[j]=='t'&&t[j+1]=='h'){
				if(t[j+2]=='e'&&!(t[j+3]>='a' && t[j+3]<='z')){
					a++;
				}
				if(t[j+2]=='i'&&t[j+3]=='s'&&!(t[j+4]>='a'&&t[j+4]<='z')){
					b++;
				}
				if(t[j+2]=='a'&&t[j+3]=='t'&&!(t[j+4]>='a'&&t[j+4]<='z')){
					c++;
				}
			}
		}
		if(a&&b&&c)break;
	}
	for(j=0;j<l;j++){
		if(s[j]>='a'&&s[j]<='z'){
			printf("%c",d[(s[j]-'a'+i)%26]);
		}
		else printf("%c",s[j]);
	}
	puts("");
	return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
#include<iostream>
#include<algorithm>
#include<set>
#include<queue>
#include<string>
#include<vector>
#include<map>
#include<stack>
#include<list>
using namespace std;
#define inf 0x3f3f3f3f

char d[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};

int main(){
	char s[110];
	char c;
	int i=0;
	while(scanf("%c",&c)!=EOF){
		s[i++] = c;
	}
	int l = strlen(s),j,k,m,t;
	for(i=0;i<=26;i++){
		char t[110]={'a'};
		for(j=0;j<l;j++){
			if(s[j]>='a'&&s[j]<='z'){
				t[j] = d[(s[j]-'a'+i)%26];
			}
			else t[j] =s[j];
		}
		int a=0,b=0,c=0;
		for(j=0;j<l-2;j++){
			if(t[j]=='t'&&t[j+1]=='h'){
				if(t[j+2]=='e'&&!(t[j+3]>='a' && t[j+3]<='z')){
					a++;
				}
				if(t[j+2]=='i'&&t[j+3]=='s'&&!(t[j+4]>='a'&&t[j+4]<='z')){
					b++;
				}
				if(t[j+2]=='a'&&t[j+3]=='t'&&!(t[j+4]>='a'&&t[j+4]<='z')){
					c++;
				}
			}
		}
		if(a&&b&&c)break;
	}
	for(j=0;j<l;j++){
		if(s[j]>='a'&&s[j]<='z'){
			printf("%c",d[(s[j]-'a'+i)%26]);
		}
		else printf("%c",s[j]);
	}
	puts("");
	return 0;
}