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<stdio.h>
#include<string>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<vector>
#include<algorithm>
#include<numeric>
#include<string.h>
#include<map>
#include<queue>

using namespace std;

typedef pair<int,int> pii;

#define rep(i,j) for(int i=0;i<(j);i++)
#define reps(i,j,k) for(int i=j;i<=k;i++)
#define in(i,j,k) ((i)>=(j)&&(i)<=(k))


int main(){
	char s[81];
	int l;
	for(;;){
		gets(s);
		if(s[0]==0)break;
		l=strlen(s);
		while(strstr(s,"the")==NULL && strstr(s,"that")==NULL && strstr(s,"this")==NULL){
			rep(i,l){
				if(in(s[i],'a','z')){
					s[i]++;
					if(s[i]>'z')s[i]-=26;
				}
			}
		}
		puts(s);
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <complex>

using namespace std;

const double PI=3.14159265;

int main()
{
	string s;
	getline(cin,s);

	for(int i=0;i<=25;i++){
		if(s.find("the")!=string::npos || s.find("this")!=string::npos
		   ||s.find("that")!=string::npos){
			cout<<s<<endl;
			break;
		}

		for(unsigned int j=0;j<s.size();j++){
			if(s[j]>='a' && s[j]<='z') s[j]=(s[j]-'a'+1)%26+'a';
		}

	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[80];
  vector<int> num;
  int i=0;
  while(cin>>str[i]){
    if(str[i].size()==4||str[i].size()==3)
      num.push_back((str[i].size()*100)+i);
  }
  int flag=0,zure=0;
  for(int i=0;i<num.size();i++){
    if(num[i]/100==3){
      for(int j=0;j<3;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-300][0]=='t'+k){
	    if(str[num[i]-300][1]=='h'+k&&str[num[i]-300][2]=='e'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
    else{
      for(int j=0;j<4;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-400][0]=='t'+k&&str[num[i]-400][1]=='h'+k){
	    if(str[num[i]-400][2]=='i'+k&&str[num[i]-400][3]=='s'+k||str[num[i]-400][2]=='a'+k&&str[num[i]-400][2]=='t'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
    i++;
  }
  for(int j=0;j<10;j++){
    for(int k=0;k<str[j].size();k++){
      str[j][k]=str[j][k]+zure;
    }
  }
  for(int j=0;j<10;j++){
    cout<<str[j];
    if(j!=10)
      cout<<" ";
  }cout<<endl;
  return 0;
}

C++: #include <cstdio>
#include <bitset>
#include <cmath>
#include <complex>
#include <vector>
#include <algorithm>
#include <stack>
#include <iostream>
#include <sstream>
#define EPS 1e-6

using namespace std;
typedef complex<double> coor;

double cross(coor a, coor b)
{
  return a.real() * b.imag() - a.imag() * b.real();
}

double dot(coor a, coor b)
{
  return a.real() * b.real() + a.imag() * b.imag();
}

int main()
{
  string str;
  while (getline(cin, str)) {
    istringstream is(str);
    string token;
    int n;
    while (is >> token) {
      for (int i = 0; i < 26; i++) {
	string tmp;
	for (int j = 0; j < token.size(); j++) {
	  tmp += (token[j] - 'a' + i) % 26 + 'a';
	}
	cout << "i = " << i << "tmp = " << tmp << endl;
	if (tmp == "the" || tmp == "this" || tmp == "that") {
	  n = i;
	  goto next;
	}
      }
    }
  next:
    printf("n = %d\n", n);
    for (int i = 0; i < str.size(); i++) {
      printf("%c", ('a' <= str[i] && str[i] <= 'z') ?(str[i] - 'a' + n) % 26 + 'a' : str[i]);
    }
  }
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>

using namespace std;

int main()
{
	string str;
	while(getline(cin,str)){
		for(int rot = 0;rot< 'z' - 'a' + 1;rot++){
			string tmp = str;
			for(int i=0; i<str.size() - 1; i++){
				if(tmp[i] == ' ') continue;
				tmp[i] = (rot + tmp[i]-'a') % ('z' - 'a' + 1) + 'a';
			}
			cout << tmp << endl;
			if(tmp.find("the") != string::npos
				|| tmp.find("this") != string::npos
				|| tmp.find("that") != string::npos)
			{
				cout << tmp << endl;
				continue;
			}
		}
	}
	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 <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	string s;
	while (getline(cin, s)){
		int n = s.length();
		while (1){
			if (s.find("the") != string::npos)break;
			if (s.find("this") != string::npos)break;
			if (s.find("that") != string::npos)break;
			REP(i, n){
				if ('a' <= s[i] && s[i] <= 'z'){
					s[i]++;
					if (s[i] > 'z')s[i] -= 26;
				}
			}
		}
		cout<<s<<endl;
	}
}