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++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	string str;		// ????????????????????????????´???????
	string trans;	// ????????????????????????????´???????
	
	while (std::getline(cin, str))
	{
		trans.clear();
		trans.resize(80);
		// n?????????????????????????????§7????????????
		for (int i = -7;; i++)
		{
			for (size_t j = 0; j < str.size(); j++)
			{
				// ???????????????????????????????????????
				if (str[j] == ' ' || str[j] == '.')
				{
					trans[j] = str[j];
				}
				else
				{
					trans[j] = str[j] + i;
				}
			}
			// ?????????????????????find??¢??°???????????¨??????
			// ???????????£??????????¨??????????????????£????????????????????????
			if (!trans.find("this") || !trans.find("the") || !trans.find("that"))
			{
				cout << trans << endl;
				break;
			}
		}

	}
	return 0;
}

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

int main()
{
	string s;
	getline(cin, s);
	int n = s.size();
	for (int i = 0; i < 26; i++) {
		bool flag = false;
		for (int j = 0; j + 3 < n; j++) {
			if (s.substr(j, 3) == "the" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (s[j + 3] < 'a' || s[j + 3] > 'z')) {
				flag = true;
			}
		}
		for (int j = 0; j + 4 < n; j++) {
			if (s.substr(j, 4) == "this" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (s[j + 4] < 'a' || s[j + 4] > 'z')) {
				flag = true;
			}
		}
		for (int j = 0; j + 4 < n; j++) {
			if (s.substr(j, 4) == "that" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (s[j + 4] < 'a' || s[j + 4] > 'z')) {
				flag = true;
			}
		}
		if (flag) {
			cout << s << endl;
			break;
		}
		for (int j = 0; j < n; j++) {
			if (s[j] >= 'a' && s[j] <= 'z') {
				s[j] = s[j] == 'z' ? 'a' : s[j] + 1;
			}
		}
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define MP make_pair
#define FR first
#define SC second
#define int long long
using namespace std;
const int MOD=1000000007;
const int INF=9000000009;

signed main(){
  string s;
  while(getline(cin,s)){
    vector<int> spe;
    REP(i,s.size())if(s[i]==' ')spe.PB(i);
    int f=0;
    LOOP(i,1,27){
      string t;
      REP(j,s.size()-1){
        if(s[j]==' ')continue;
        if((s[j]+i)<=122){
          t+=(s[j]+i);
        }else{
          t+=((s[j]+i)-26);
        }
      }
      REP(j,t.size()){
        if(t.substr(j,3)=="the"||t.substr(j,4)=="that"||t.substr(j,4)=="this"){
          int p=0;
          REP(k,t.size()){
            if(k==spe[p]-p-1){
              cout<<t[k]<<" ";
              p++;
            }else{
              cout<<t[k];
            }
          }
          cout<<"."<<endl;
          f=1;
          break;
        }
      }
      if(f)break;
    }
  }
  return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

int main()
{
//    char c = 'x';
//    char d = '|';
//    char e = 'm';
//
//    printf("%d %d %d\n", c, d, e);
//
//    c = 't';
//    d = 'h';
//    e = 'i';
//
//        printf("%d %d %d\n", c, d, e);


    char s[80 + 7];
    char ans[80 + 7];

    while(gets(s))
    {
        int k = 0;
        for(int i = 0; s[i]; i++)
        {
            if(s[i] >= 'a' && s[i] <= 'z')
            {
                ans[k] = s[i] - 4;
                k++;
            }
            else {
                ans[k] = s[i];
                k++;
            }
        }
        ans[k] = '\0';
        puts(ans);
    }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main(void) {
	char str[81];
	int shift = 0;
	while(cin.getline(str, 81)) {
		shift = 0;
		for(int i = 0; str[i] != NULL; i++) {
			if((str[i] != NULL) && (str[i+1] != NULL) && (str[i+2] != NULL) &&
				(str[i] != ' ') && (str[i+1] != ' ') && (str[i+2] != ' ')) {
					if(str[i+1] - str[i] == 'h' - 't') {
						if(str[i+2] - str[i+1] == 'e' - 'h') {
							shift = 't' - str[i];
							break;
						}
						if(str[i+3] != NULL && str[i+3] != ' ') {
							if((str[i+2] - str[i+1] == 'i' - 'h') && (str[i+3] - str[i+2] == 's' - 'i')) {
								shift = 't' - str[i];
								break;
							}
							if((str[i+2] - str[i+1] == 'a' - 'h') && (str[i+3] - str[i+2] == 't' - 'a')) {
								shift = 't' - str[i];
								break;
							}
						}
					}
			}
		}

		for(int i = 0; str[i] != NULL; i++) {
			if(str[i] != ' ' && str[i] != '.') {
				str[i] = (str[i] - 'a' + shift + ('z' - 'a' + 1)) % ('z' - 'a' + 1) + 'a';
			}
		}

		cout << str << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#define INF 1000000000

using namespace std;

// the this that

int main() {
  string str,n1="the",n2="this",n3="that";
  while (getline(cin, str)) {    
    for (int i=0; i<26; i++) {
      for (int j=0; j<3; j++) n1[j] = (n1[j]=='z')? 'a' : n1[j] + 1;
      for (int j=0; j<4; j++) n2[j] = (n2[j]=='z')? 'a' : n2[j] + 1;
      for (int j=0; j<4; j++) n3[j] = (n3[j]=='z')? 'a' : n3[j] + 1;
      if (str.find(n1)!=string::npos||str.find(n2)!=string::npos||str.find(n3)!=string::npos) {
	for (int j=0; j<str.length(); j++) {
	  if (isalpha(str[j])) {
	    str[j]=(str[j]+i)%26+'a';
	  }
	}
	break;
      }
    }
    cout << str << endl;
  }
}