Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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, d;
	int sum_n[50][3] = { 0 };
	char str[MAX];
	while (gets_s(str) != NULL) {
		for (int i = 0; str[i] != '\0'; ++i) {
			if (str[i] - 't' == str[i + 1] - 'h') {
				d = str[i] - 't';
				if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a' && (str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
				else if ((str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a' && (str[i + 2] - 'a' - d + ABC) % ABC == 'e' - 'a') { break; }
			}
		}
		for (int i = 0; str[i] != '\0'; ++i) {
			if ('a' <= str[i] && str[i] <= 'z') {
				printf("%c", (str[i] - 'a' - d + ABC) % ABC + 'a');
			}
			else { printf("%c", str[i]); }
		}
		printf("\n");
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <cstring>
using namespace std;
typedef long long int ll;
const int INF = 1000000000;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
int main(){
    string s;
    while(getline(cin, s)){
        rep(i, 26){
            for(char& c : s){
                if(isalpha(c)){
                    if(c != 'z') ++c;else c = 'a';
                }
            }
            if(s.find("that") != string::npos || s.find("this") != string::npos || s.find("the") != string::npos){
                cout << s << endl;
            }
        }
    }
    return 0;
}

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

bool find(string str, string can) {
  string tmp_can = ' ' + can + ' ';
  string tmp_str = ' ' + str + ' ';
  for (int i = 0; i < tmp_str.length(); ++i) {
    if (string::npos != tmp_str.find(tmp_can, i)) {
      return true;
    }
  }
  return false;
}

int main() {
  string str;
  string candies[] = {"this", "the", "that"};
  while(getline(cin, str)) {
  for (int m = 0; m < 25; ++m) {
    for (int i = 0; i < str.length(); ++i) {
      if (str[i] == ' ') {
        continue;
      }
      if (str[i] == ',' || str[i] == '.') {
        str[i] = ' ';
        continue;
      }
      int char_id = static_cast<int>(str[i]) - 97;
      int shifted = static_cast<int>(char_id + 1);
      str[i] = static_cast<char>(shifted % 26 + 97);
    }
    cout << str << endl;
    for (int i = 0; i < sizeof(candies) / sizeof(candies[0]); ++i) {
      if (find(str, candies[i])) {
        cout << "!!!" << endl;
        break;
      }
    }
  }
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
string str;	
int a, b, c, d;
int main(){
	while(getline(cin, str)){
		a = str.length();
		for(int i = 0; i < a; i++){
			if(str[i] < 97 || str[i] > 122){
				cout << str[i];
			}
			else {
				b = (int)str[i];
				b = b - 4;
				if(b < 97)
					b = b + 26;
				cout << (char)b;
			}
		}
		cout << endl;
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
#include <stack>
using namespace std;

int main(){
	int gap = 0;
	string s;
	getline(cin, s);
	for (int i = 0; i < 3; ++i) {
		for (int j = 0; j < 'z' - 'a' + 1; ++j) {
			string cs;
			if (i == 0) cs = "the";
			if (i == 1) cs = "that";
			if (i == 2) cs = "this";
			for (int k = 0; k < cs.length(); ++k) {
				int sum;
				sum = (cs[k] - 'a' + j) % ('z' - 'a' + 1);
				cs[k] = 'a' + sum;
			}
			if (s.find(cs) != string::npos) {
				gap = j;
				break;
			}
		}
		if (gap != 0) break;
	}
	for (int i = 0; i < s.length(); ++i) {
		if ('a' <= s[i] && s[i] <= 'z') {
			int sum;
			sum = (s[i] - 'a' - gap + 'z' - 'a' + 1) % ('z' - 'a' + 1);
			s[i] = sum + 'a';
		}
	}
	cout << s << endl;
	return 0;
}

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

typedef pair<string, string> P;

P next_word(string sentence) {
  if (sentence.empty()) return make_pair(string(""), string(""));
  if (sentence[0] == ' ' || sentence[0] == '.') {
    return make_pair("", sentence.substr(1));
  } else {
    P recur = next_word(sentence.substr(1));
    return make_pair(sentence[0] + recur.first, recur.second);
  }
}

bool acceptable(string sentence) {
  P p = next_word(sentence);

  while (! p.first.empty() ) {
    if (p.first == "this" || p.first == "the" || p.first == "that")
      return true;

    p = next_word(p.second);
  }
  return false;
}

char slip(char c) {
  if (c < 'a' || 'z' < c) return c;
  
  string alphabet = "abcdefghijklmnopqrstuvwxyza";
  int index = (int)(c - 'a');
  return alphabet[index + 1];
}

char slip(char c, int n) {
  for (int i = 0; i < n; i++)
    c = slip(c);

  return c;
}

string slip(string code, int n) {
  string val;
  for (int i = 0, len = code.length(); i < len; i++)
    val += slip(code[i], n);

  return val;
}

string decode(string code) {
  for (int i = 1; i < 27; i++) {
    string sentence = slip(code, i);
    if (acceptable(sentence))
      return sentence;
  }

  return "";
}

int main() {
  string code;
  while ( getline(cin, code) )
    cout << decode(code) << endl;
}

C++: #include <cstdio>
#include <cstring>
#include <cctype>
#include <algorithm>
using std::__gcd;
using std::sort;

void trans(char *s,char *p,int shift){
	for(int i=0;;++i){
		if( isalpha(s[i]) )
			p[i] = (s[i]-'a'+shift)%26 + 'a';
		else p[i] = s[i];
		if( s[i] == 0 ) return;
	}
}

bool check(char *s){
	if( *s != 't' ) return 0;
	++s;
	if( *s != 'h' ) return 0;
	++s;
	if( *s == 'e' ) return 1;
	else if( *s == 'i' && *(s+1) == 's' ) return 1;
	else if( *s == 'a' && *(s+1) == 't' ) return 1;
	return 0;
}

int main(){
	char s[100];
	while( gets(s) ){
		char p[100];
		bool ok = 0;
		for(int i=0;!ok&&i<26;++i){
			trans(s,p,i);
			for(int j=0;!ok&&s[j];++j)
				if(check(p+j)) ok = 1;
		}
		printf("%s\n",p);
	}
	return 0;	
}

C++: a='abcdefghijklmnopqrstuvwxy'
b=input()
for i in range(26):
 c=''.join(a[ord(e)-97-i]if e in a else e for e in b)
 if any(('the 'in c,'this 'in c,'that 'in c)):print(c);break