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++: #include <bits/stdc++.h>
using namespace std;
string word[3] = {"this","that","the"};
int main(){
  char c;
  string s[8000];
  int smax = 0;
  while(scanf("%c",&c) != EOF){
    if(c == '\n' || c == ' '){
      smax++;s[smax] += c;
      smax++;
    }else{
      s[smax] += c;
    }
  }smax++;
  bool flag = false;
  while(1){
    for(int i = 0;i < smax;i++){
      for(int j = 0;j < s[i].size();j++){
	if(isalpha(s[i][j])){
	  s[i][j]++;
	  if(s[i][j] == 'z' + 1)s[i][j] = 'a';
	}
	for(int j = 0;j < 3;j++){
	  if(word[j] == s[i]){flag = true;break;}
	}for(int j = 0;j < 3;j++){
	  if(word[j] + '.' == s[i]){flag = true;break;}
	}
      }
    }
    if(flag)break;
  }
  for(int i = 0;i < smax;i++)cout << s[i];
  return 0;
}

C++: #include<cstdio>
using namespace std;
int main()
{
    char a[1500]={0};
    while(scanf("%[^\n]",a)!=EOF)
    {
        getchar();
        for(;;)
        {
            for(int i=0;;i++)
            {
                if(a[i]==0)break;
                if(a[i]==122)a[i]=97;
                else if(97<=a[i]&&a[i]<122)a[i]++;
                else;
            }
            for(int i=0;;i++)
            {
                if(a[i]==0)break;
                if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='i'&&a[i+3]=='s'&&(a[i+4]==' '||a[i+4]=='.'||a[i+4]==0))goto end;
                if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='a'&&a[i+3]=='t'&&(a[i+4]==' '||a[i+4]=='.'||a[i+4]==0))goto end;
                if(a[i]=='t'&&a[i+1]=='h'&&a[i+2]=='e'&&(a[i+3]==' '||a[i+3]=='.'||a[i+3]==0))goto end;
            }
        }
        end:;
        printf("%s\n",a);
        for(int i=0;i<1500;i++)
        {
            a[i]=0;
        }
    }
    return 0;
}

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

int main()
{
  string str;

  while (getline(cin, str)){
    while (1){
      for (int i = 0; i < str.size(); i++){
        if ('a' <= str[i] && str[i] <= 'z'){
          if (str[i] != 'z')  str[i]++;
          else  str[i] = 'a';
        }
      }
      if (str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos){
        cout << str << endl;
        break;
      }
    }
  }
}

C++: /*0017 written by iPhone*/
#include <iostream>
#include <string>

using namespace std;

int main(){
    string s;
    while(getline(cin, s) && s != "\0"){
        for(int i = 0; i < s.size(); i++) s[i]++;
        if(s.find("the") != -1 || s.find("this") != -1 || s.find("that") != -1 ){
            cout << s;
            return 0;
        }
    }
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
  string s;
  int pl=0;
  getline(cin,s);
  for(int i =-27;i<27;i++){
    for(int j = 0; j < s.size(); j++){
      if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'e'){
	pl = i;
	break;
      }
      else if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'a' && s[j+3]+i=='t'){
	pl = i;
	break;
      }
      else if(s[j]+i=='t' &&s[j+1]+i == 'h' && s[j+2]+i == 'i' && s[j+3]+i=='s'){
	pl = i;
	break;
      }
    }
    if(pl!=0) break;
  }
  for(int i=0;i <s.size();i++){
    if(s[i]<='z' && s[i]>='a') s[i] += pl;
  }
  cout<<s<<endl;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <sstream>
using namespace std;

#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()

string chipher(string tmp, int k){
	rep(i,tmp.size())if( 'a'<=tmp[i] && tmp[i]<='z' ){
		if( tmp[i]+k>'z' ){
			tmp[i] = (tmp[i]+k-'z'-1)+'a';
		}else{
			tmp[i] = tmp[i]+k;
		}
	}
	return tmp;
}
int main(){
	string in;
	while(getline(cin,in)){
		rep(i,26){
			string tmp = chipher(in,i);
			if( tmp.find("this")!=string::npos || tmp.find("the")!=string::npos ||
					tmp.find("that")!=string::npos ){
					
				cout << tmp << endl; break;
			}
		}
	}
	return 0;
}

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

using namespace std;

void q17() {
	vector<string> hints = { "the","this","that" };
	vector<vector<string>> shiftHints;
	for (int i = 0; i < 26; i++) {
		vector<string> iShiftHints;
		for (int j = 0; j < hints.size(); j++) {
			string tmp = "";
			for (int k = 0; k < hints[j].length(); k++) {
				char z = ((hints[j][k] - 'a' + i) % 26) + 'a';
				tmp += ((hints[j][k] - 'a' + i) % 26) + 'a';
			}
			iShiftHints.push_back(tmp);
		}
		shiftHints.push_back(iShiftHints);
	}

	string str;
	for (; getline(cin, str);) {
		int s;
		bool flag = false;
		for (s = 0; s < 26; s++) {
			for (int i = 0; i < hints.size(); i++) {
				if (str.find(shiftHints[s][i]) != -1) {
					flag = true;
				}
			}
			if (flag) break;
		}

		string ans = "";
		for (int i = 0; i < str.length(); i++) {
			if ('a' <= str[i] && str[i]<= 'z') {
				ans += (str[i] - 'a' - s) % 26 + 'a';
			}
			else {
				ans += str[i];
			}
		}
		cout << ans << endl;
	}
}

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

C++: #include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <cmath>
using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define llong long long

int main() {
  char *a = (char*)malloc(sizeof(char)*82);
  size_t l = 0;
  while (getline(&a, &l, stdin) != EOF) {
    while(1) {
      int q = 0;//1..t, 2..th, 3..the, 4...thi, 5..this, 6..tha, 7..that 
      REP(j , (int)l-1) {
	if(a[j] == 'z') a[j] = 'a';
	else if(a[j] >= 'a' && a[j] < 'z') a[j]++;
      }
      REP(j , (int)l-1) {
	switch(q){
	case 0:
	  if(a[j] == 't') q++;
	  break;
	case 1:
	  if(a[j] == 'h') q++;
	  else q = 0;
	  break;
	case 2:
	  if(a[j] == 'e') q = 3;
	  else if(a[j] == 'i') q = 4;
	  else if(a[j] == 'a') q = 6;
	  else q = 0;
	  break;
	case 4:
	  if(a[j] == 's') q = 5;
	  else q = 0;
	  break;
	case 6:
	  if(a[j] == 't') q = 7;
	  else q = 0;
	  break;
	}
      }
      if(q == 3 || q == 5 || q == 7) break;
    }
    
    REP(i , (int)l-1) {
      printf("%c",a[i]);
    }
  }
  return 0;
}