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<iostream>
#include<string>
#include<vector>
using namespace std;

int main(void){
  string s;
  string a[3] = {"this","the","that"};
  getline(cin,s);
  vector<string> ss;
  string n = "";
  s += " ";
  for(int i = 0  ; i < s.size() ; i ++){
    if(s[i] == ' '){
      ss.push_back(n);
      n = "";
    }else{
      n += s[i];
    }
  }
  bool ans = true;
  for(int i = 0 ; i < ss.size() ; i ++){
    for(int j = 0 ; j < ss[i].size() ; j ++){
      if('a' > ss[i][j] && ss[i][j] < 'z')continue; 
      ss[i][j] ++;
      if(ss[i][j] == 'z' + 1)ss[i][j] = 'a';
    }
    for(int j = 0 ; j < 3 ; j ++){
      for(int k = 0 ; k < a[i].size() ; k ++){
	if(k == a[i].size() - 1){
	  ans = false;
	}else if(a[i][k] != ss[j][k]){
	  break;
	}
      }
      break;
    }
  }
  while(ans){
    for(int i = 0 ; i < ss.size() ; i ++){
      for(int j = 0 ; j < ss[i].size() ; j ++){
	if('a' > ss[i][j] && ss[i][j] < 'z')continue;
	ss [i][j]++;
	if(ss[i][j] == 'z' + 1)ss[i][j] = 'a';
      }
      for(int j = 0 ; j < 3 ; j ++){
	for(int k = 0 ; k < a[i].size() ; k ++){
	  if(k == a[i].size() - 1){
	    ans = false;
	  }else if(a[i][k] != ss[j][k]){
	    break;
	  }
	}
	break;
      }
    }
  }
  for(int i = 0 ; i < ss.size() ; i ++){
    cout<<ss[i]<<" "; 
  }
  cout<<endl;
}

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

int main(){
	string sa;
	
	while(getline(cin,sa)){
		
		for(int j=0;j<26;j++){
			int a=sa.size();
		for(int i=0;i<a;i++){
			if(sa[i]>='a'&&sa[i]<='z'){
				sa[i]+=1;
				if(sa[i]>'z'){
					sa[i]-=26;
					}
				}
			}	
			size_t z=sa.find("this");
			size_t za=sa.find("that");
			size_t zb=sa.find("the");
			if(z!=string::npos){break;}
			else if(za!=string::npos){break;}
			else if(zb!=string::npos){break;}
			}
			cout<<sa<<endl;
			
		}
		return 0;
	}

C++: #include<iostream>
#include<string>
using namespace std;
int main() {
	string a = "";
	while (getline(cin, a)) {
		a += " ";
		string b = "";
		int z = 0, sum = 0;
		int k = a.length();
		for (int i = 0; i <k; i++) {
			if (a[i] == ' ' || a[i] == '.') {
				b = a.substr(z, i - z);
				int t = (int)'t';
				string c = "";
				if (b.length() == 3 || b.length() == 4) {
					c = "";
					int w = t - (int)b[0];
					for (int i = 0; i < b.length(); i++) {
						int d = (char)((int)b[i] + w);
						if (d > 'z')
							d -= 26;
						else if (d < 'a')
							d += 26;
						c += (char)d;
					}
					if (c == "the" || c == "that" || c == "this") {
						sum = w;
						break;
					}
				}
				z = i + 1;
			}
		}
		string f = "";

		for (int i = 0; i < k - 1; i++) {
			if (a[i] != ' ' && a[i] != '.') {
				int g = (int)a[i] + sum;
				if (g >(int)'z')
					g -= 26;
				else if (g < (int)'a')
					g += 26;
				f += (char)g;
			}
			else {
				f += a[i];
			}
		}
		cout << f << endl;
	}
}

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

typedef long long ll;
#define rep(i,n) for(i=0;i<n;++i)
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); itr++)
#define mp make_pair
#define pb push_back
#define fi first
#define sc second

int main(int argc, char const *argv[]) {
  string a="abcdefghijklmnopqrstuvwxyz";
  a += a;

  string s;

  while(getline(cin,s)){
    //cout << s << endl;

    string t="";
    bool end=false;
    int i;
    for(int w=0; w<=25; ++w){
      //printf("w=%d\n", w);
      t="";
      int p=0;
      rep(i,s.size()){
        if('a'<=s[i] && s[i]<='z'){
          t+=a[s[i]-'a'+w];
        }
        else{
          t+=s[i];
          string tmp=t.substr(p,i-p);
          //cout << tmp << endl;

          if(tmp=="this" || tmp=="the" || tmp =="that") end=true;

          p=i+1;
        }
      }

      if(end) break;
    }

    std::cout << t << std::endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>

using namespace std;

int main()
{
    string input;
    const int alph_lim = 26;

    while (getline(cin, input, '\n')) {
        for (int i = 0; i < alph_lim; i++) {
            for (int j = 0; j < input.size(); j++) {
                if (islower(input[j])) {
                    input[j]++;
                    if (input[j] > 'z') 
                        input[j] -= alph_lim;
                }
            }

            if (input.find("the") != string::npos ||
                input.find("this") != string::npos ||
                input.find("that") != string::npos) {
                cout << input << endl;
                break;
            }
        }
    }

    return 0;
}

C++: #include<iostream>
#include<cstring>
#include<sstream>
using namespace std;
/*
string text = "hello world";
stringstream ss(text);
string t;
while (ss >> t){
*/
void fin(string a)
{
	a.erase(0,1);
	cout << a << endl;
	return;
}
int main()
{
	string a,b;
	bool fir=false;
	while (cin >> b)
	{
		a.append(" ");
		a.append(b);
		fir = true;
	}
	while (1)
	{
		if (a.find(" the ", 0) != string::npos||a.find(" the.",0)!=string::npos)
		{
			fin(a); return 0;
		}
		if (a.find(" this ", 0) != string::npos||a.find(" this.", 0) != string::npos)
		{
			fin(a); return 0;
		}
		if (a.find(" that ", 0) != string::npos || a.find(" that.", 0) != string::npos)
		{
			fin(a); return 0;
		}
		for (int i = 0; i < a.size(); i++)
		{
			if (a[i] != ' '&&a[i]!='.')a[i] += 1;
			if (a[i]>'z')a[i] = 'a';
		}
	}
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


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