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 <vector>
#include <cstdio>

//2^32/26 = 165191049.846153846153846 = 165191050
#define MAGIC 0x9D89D8A

char shift (char c, int amount)
{
    long n;
    long q ;
    long r;
    
    n = (long) c - 'a' +  amount;
    q = n * MAGIC;
    q >>= 32;
    r = n - q * 26;
    
    return (char) 'a' + r;
}

void shiftString (char* s, int amount)
{
    int i = 0;
    while (s[i]) {
        
        if (s[i] == ' ') {}
        else if (s[i] == '.') {}
        else { s[i] = shift(s[i], amount); }
        i++;
    }
    
}

int main(int argc, const char * argv[]) {

   
    char buffer[256];
    std::string line;
    std::vector<std::string> listString;
    int result = 0;
    std::size_t found;
    
    
    while (std::getline(std::cin, line))
    {
        //sprintf(buffer, "%s", line.c_str());
        listString.push_back(line);
    }
    
    
    std::vector<std::string>::iterator it;
    
    it = listString.begin();
    
    do {
        result = 0;
        sprintf(buffer, "%s", (*it).c_str());
        
        while (!result)
        {
            
            shiftString(buffer, -1);
            line = buffer;
            
            result = 0;
            
            found = line.find("the");
            result += found!=std::string::npos;
            
            found = line.find("this");
            result += found!=std::string::npos;

            found = line.find("that");
            result += found!=std::string::npos;

        }
        
        printf("%s\n", buffer);
        
    } while (++it < listString.end());

    return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <string>
using namespace std;
int main(){
	int num,x=0;
	string str,sum,ans;
	char c;
	while(getline(cin,str)){
		for(int j=0;j<26;j++){
			sum="";
			for(int i=0;i<str.size();i++){
				if('a'<=str[i]&&str[i]<='y'){
					c=str[i];
					c+=1;
					sum+=c;
				}else if(str[i]=='z'){
					c=str[i];
					c-=25;
					sum+=c;
				}else{
					c=str[i];
					sum+=c;
				}
			}
			swap(str,sum);
			num=0;
			for(int l=0;l<str.size();l++){
				if(str[l]==' '||str[l]=='.'){
					ans="";
					for(int k=num;k<l;k++){
						c=str[k];
						ans+=c;
					}
					num=l+1;
					if(ans=="this"||ans=="that"){
						x=1;
						break;
					}else if(ans=="the"){
						x=1;
						break;
					}
				}
			}
			if(x==1){
				cout<<str<<endl;
				x=0;
				break;
			}
		}
	}
	return 0;
}

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

int main(int argc, char *argv[]){
	string s;
    while(getline(cin,s)){

		while(s.find("that") ==string::npos 
			  && s.find("the") ==string::npos
			  && s.find("this") ==string::npos){
			for (int i = 0; i < s.length(); ++i){
				if(s[i]<'z' && s[i] >='a') s[i]++;
				else if(s[i]=='z') s[i]='a';
			}
		    
			
		}
		cout<<s<<endl;
	}
    return 0;
}

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

int main(){
  char cip[80][80];
  int words;
  int i, j;
  int gap;

  words=0;
  while(cin>>cip[words]) words++;

  for(i=0; i<words; i++){
    for(j=0; j<strlen(cip[i]); j++){
      if(cip[i][j]=='.') continue;
      cip[i][j]-='a';
    }
    if(strlen(cip[i])==3
       && (cip[i][1]-cip[i][0]+26)%26==14
       && (cip[i][2]-cip[i][0]+26)%26==11){
      gap=(cip[i][0]-('t'-'a')+26)%26;
      continue;
    }
    if(strlen(cip[i])==4
       && (cip[i][1]-cip[i][0]+26)%26==14
       && (cip[i][2]-cip[i][0]+26)%26==15
       && (cip[i][3]-cip[i][0]+26)%26==25){
      gap=(cip[i][0]-('t'-'a')+26)%26;
      continue;
    }
    if(strlen(cip[i])==4
       && (cip[i][1]-cip[i][0]+26)%26==14
       && (cip[i][2]-cip[i][0]+26)%26==7
       && (cip[i][3]-cip[i][0]+26)%26==0){
      gap=(cip[i][0]-('t'-'a')+26)%26;
      continue;
    }
  }
  for(i=0; i<words; i++){
    for(j=0; j<strlen(cip[i]); j++){
      if(cip[i][j]=='.') continue;
      cip[i][j]=(cip[i][j]-gap+26)%26+'a';
    }
    if(i==words-1) printf("%s\n", cip[i]);
    else printf("%s ", cip[i]);
  }

  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

using namespace std;


int main(){
	
	string s;
	
	while(getline( cin,s)){
		while (s.find("the")==-1&&s.find("this")==-1&&s.find("that")==-1) {
			for (int i=0; i<s.size(); i++) {
				if (s[i]>='a'&&s[i]<'z') {
					s[i]++;
				}
				else if(s[i]=='z')
					s[i]='a';
			
			}
		}
		cout << s <<endl;
	}
	
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<cassert>
#include<iostream>
#include<sstream>
#include<string>
#include<vector>
#include<queue>
#include<set>
#include<map>
#include<utility>
#include<numeric>
#include<algorithm>
#include<bitset>
#include<complex>

using namespace std;

typedef long long Int;
typedef vector<int> vint;
typedef pair<int,int> pint;
#define mp make_pair

template<class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cout << *i << " "; cout << endl; }
template<class T> void chmin(T &t, T f) { if (t > f) t = f; }
template<class T> void chmax(T &t, T f) { if (t < f) t = f; }
int in() { int x; scanf("%d", &x); return x; }

int main() {
	string str;
	char chr[100];
	for(;gets(chr);){
		str=chr;
		int len=str.size();
		int i,c;
		for(c=1;c<=26;c++){
			for(i=0;i<len;i++){
				if('a'<=str[i]&&str[i]<='z'){
					str[i]++;
					if(str[i]>'z')str[i]='a';
				}
			}
			//cout<<str<<endl;
			if(str.find("the")!=string::npos||str.find("this")!=string::npos||str.find("that")!=string::npos){
				cout<<str<<endl;
				break;
			}
		}
	}
	return 0;
}