Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    char str[81] = {'\0'};
    int i, j, k;
    bool check;
    char gar[5];

    while(gets(str)){
        check = true;
        while(check){
            i = k = 0;
            while(str[i] != '.'){
                if(str[i] != ' ')
                    str[i]++;
                if(str[i] == 'z' + 1){
                    str[i] = 'a';
                }
                i++;
            }
            while(str[k + 4]){
                if( (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'i' && str[k + 3] == 's') || (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'a' && str[k + 3] == 't') || (str[k] == 't' && str[k + 1] == 'h' && str[k + 2] == 'e'))
                    check = false;
                    break;
            }
                if(str[k] != ' ') k++;
            k++;
        }
    cout << str << endl;
    }
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	const string key[] = { "the", "this", "that" };
//	cut here before submit 
//	freopen("testcase.cc", "r", stdin);
	string str = "";
	
	while (getline (cin, str )){
		int len = str.length();
		int i,j;
		vector <bool> match (3, false);

		for (j = 0; j < 26; ++j){
			string curr = str;
			for (i = 0; i < len; ++i){
				if ( isalpha(str[i]) ){
					curr[i] = (str[i] - 'a' + j) % 26 + 'a';
				} // end if
			} // end for
//			cout << "curr: " << curr << endl;

			for (i = 0; i < 3; ++i){
				if ( curr.find(key[i]) != string::npos ){
					match[i] = true;
				} // end if
			} // end for
			if ((int)count(match.begin(), match.end(), true ) > 0){
				cout << curr << endl;
				break;
			} // end if
		} // end for
	} // end while
		
	return 0;
}

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;
  while(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 <cstdio>
#include <vector>
#include <string>
#include <ctype.h>
#include <algorithm>
using namespace std;

#define loop(i,a,b) for(int i=(a); i<(int)(b); i++)
#define rep(i,b) loop(i,0,b)
#define all(c) (c).begin(), (c).end()
 
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

int main() {
  string s; getline(cin, s);
  int slide = 0;
  rep(i, s.size()-4) {
    if(islower(s[i]) == 0) continue;
    rep(j, 26) {
      string sub;
      rep(k, 4) sub += (s[i+k]-'a'+j+52)%26 + 'a';
      if(sub.substr(0,3) == "the") slide = j;
      else if(sub == "this" || sub == "that") slide = j;
    }
    if(slide != 0) break;
  }
  rep(i, s.size()) {
    if(islower(s[i]) != 0)printf("%c", (s[i]-'a'+slide+52)%26 + 'a');
    else cout << s[i];
  }
  cout << endl;
}

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

using namespace std;

string slide(string s) {
  string r = s;
  for (int i = 0; i < r.length(); i++) {
    if (islower(r[i])) {
      if (r[i] == 'z') r[i] = 'a';
      else r[i] += 1;
    }
  }
  return r;
}

bool check_word(string s) {
  string dic[3] = {"this", "the", "that"};
  for (int i = 0; i < 3; i++)
    if (s.find(dic[i]) != string::npos) return true;
  return false;
}

int main() {
  string in, temp;
  bool found;
  while (1) {
    getline(cin, in);
    if (cin.eof()) break;
    for (temp = in, found = false; ; temp = slide(temp)) {
      found = check_word(temp);
      if (found) break;
    }
    cout << temp << endl;
  }
  return 0;
}

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

int main(){

	string code;

	while( getline(cin, code) ){

		for( int j=0;j<25;j++ ){
			for( int i=0;i<code.length();i++ ){
				if( code[i] >= 'a' && code[i] <= 'z' ){
					code[i] += 1;
					if(code[i]=='z'+1)code[i]='a';
				}
			}
			if(code.find("the ") != -1 || code.find("this") != -1 || code.find("that") != -1)
				break;		
		}
		cout << code << endl;
	}
	return 0;

}

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++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

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

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

int main() {
	int i, j;
	string news;
	while (getline(cin, news)){
		for (i = 1; i <= 25; i++) {
			for (j = 0; j < news.size(); j++){
				if (news[j]>'a' && news[j] <= 'z')news[j] -= 1;
				else if (news[j] == 'a') news[j] = 'z';
			}
			for (j = 0; j < news.size() - 2; j++) {
				if ((news[j] == 't'&&news[j + 1] == 'h') && (news[j + 2] == 'e' || (news[j + 2] == 'i'&&news[j + 3] == 's') || (news[j + 2] == 'a'&&news[j + 3] == 't'))) {
					goto end;
				}
			}
		}
	end:
		cout << news << endl;
	}
}

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

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