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<list>
#include<string>
#include<cctype>
using namespace std;

bool checkString(int* key, string s);
void rotateChar(string* s, int i);

int main()
{
    list<string> table;
    string s;

    while(cin>>s) table.push_back(s);
    
    int key;
    list<string>::iterator i;
    for(i=table.begin(); i!=table.end(); i++){
        // cout << *i << " ";
        if( i->size() == 3 || i->size() == 4 )
            if( checkString(&key, *i) ) break;
    }
    
    int flag = 0;
    for(i=table.begin(); i!=table.end(); i++){
        if(!flag){
            rotateChar( &(*i), key);
            cout << *i;
            flag = 1;
        }else{
            rotateChar( &(*i), key);
            cout << " " << *i ;
        }
    }
    cout << endl;
            
    return 0;
}

void rotateChar(string* s, int i) // iは何文字ずらしたいか
{

    for(int j=0; j<s->size(); j++){
        if(!isalpha(s->at(j))){continue;}
        char c = s->at(j) - 'a';
        s->at(j) = 'a' + (c+i)%26;
    }
}

bool checkString(int* key, string s)
{

    for(int i=0; i<26; i++){
        string tmp = s;
        rotateChar(&tmp, i);
        // cout << tmp << endl;
        if( tmp=="the" || tmp=="this" || tmp=="that" ){
            *key=i;
            return true;
        }
    }
    return false;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	string s;
	while(getline(cin,s)){
		while(s.find("this")==string::npos&&s.find("that")==string::npos&&s.find("the")==string::npos){
			rep(i,s.size())if(isalpha(s[i])){
				if(s[i]=='z')s[i]='a';
				else s[i]++;
			}
		}
		cout<<s<<endl;
	}
}

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

int main(){
  string word[111];
  string com[3]={"the","this","that"};
  int cou=0;
  while(cin >> word[cou]){
    cou++;
  }
  cout << endl;

  while(1){
    bool flag = false;
    for(int i=0;i<cou;i++){
      for(int j=0;j<word[i].size();j++){
	if(word[i][j] == 'z'){
	  word[i][j] = 'a';
	}
	else if(word[i][j] >= 'a' && word[i][j] <= 'z'){
	  word[i][j]++;
	}
      }
      for(int j=0;j<3;j++){
	if(word[i] == com[j]){
	  flag = true;
	  break;
	}
      }
    }
    if(flag == true){
      break;
    }
  }
  for(int i=0;i<cou;i++){
    cout << word[i];
    if(i == cou-1) cout << endl;
    else cout << " ";
  }
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string.h>
#include <queue>
#include <stack>
#include <utility>
#include <queue>
#define mp make_pair
#define pii pair<int,int> 
#define ff first
#define ss second

using namespace std;

char a[1000];
int b,c;

int main()
{
	while(fgets(a,999,stdin))
	{
		c=0;
		while(true)
		{
			if(strstr(a,"this")||strstr(a,"the")||strstr(a,"that"))break;
			for(b=0;b<strlen(a);b++)
			{
				if(islower(a[b]))
				a[b]++;
				if(a[b]>122)
				a[b]=97;
			}
			c++;
			if(c>27)
			break;
		}
		printf("%s",a);
	}
	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int main(){
  string s,t;
  while(getline(cin,s)){

    for(int i = 0 ; i < 25 ; i++ ){
      t = "";
      for(int j = 0 ; j < (int)s.size() ; j++ ){
	int c = (int)(s[j] + i)%123;
	if('a'<=s[j] && s[j] <= 'z')t += (char)((c < 97) ? (c + 97): c);
	else t += s[j];
      }
      if(t.find("the") != string::npos ||
	 t.find("this") != string::npos ||
	 t.find("that") != string::npos ){
	cout << t << endl;
	break;
      }
    }
  }
  return 0;
}

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

using namespace std;

void CaesarCipher(const string&);
int main(){
  string str;
  while(getline(cin,str)){
    CaesarCipher(str);
  }
}


void CaesarCipher(const string& str){
  string diffstr=str;
  int diff=1;
  while(diffstr.find("the")==string::npos&&
        diffstr.find("this")==string::npos&&
        diffstr.find("that")==string::npos ){
    for(int i=0;i<str.length();i++){
      if( !isalpha(str[i])) continue;
      diffstr[i]=(diff+str[i]-'a')%26+'a';
    }
    diff++;
  }
  cout<<diffstr<<endl;
}

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

std::string Caesar(std::string str, int tranceNum )
{
	for(size_t i=0; i<str.length(); ++i)
	{
		if('a'<=str[i] && str[i]<='z')
		{
			int chNum = 0;
	
			chNum = str[i];

			chNum += tranceNum;

			chNum = (chNum-97)%26+97;
	
			str[i] = chNum;	
		
		}
	}

	return str;
}

int main()
{
	std::string sentence;

	while(std::getline(std::cin,sentence))
	{
		bool flg=0;

		
		for(;;)
		{
			sentence=Caesar(sentence,1);

			std::string checkword = ""; 

			size_t i=0;

			for( ; i<sentence.size() && flg==0; ++i)
			{
				switch(sentence[i])
				{
				case 't': case 'h': case 'i': case 's': case 'a': case 'e':
					checkword+=sentence[i];
					break;
				default :
					checkword = "";
					break;
				}

				if(checkword=="this" || checkword=="the" || checkword=="that")
				{
					break;
				}
			}
			if(i!=sentence.size())
			{
				std::cout << sentence << '\n';

				break;
			}
		}
	}
}

C++: #include <cstdio>
#include <iostream>
#include <cstring>

using namespace std;

char data[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char trans[100];
char mozi;
int position=0;
int zoom;
int first_check=0,first_position=0;
int now;
char result;

int main(){
	while(scanf("%c",&mozi) != EOF){

		if(first_check == 0)

		for(int i=0;i<26 && first_check == 0;i++){
			if(mozi == data[i]){
				first_position = i;
				zoom = first_position - 19;
				first_check = 1;
			}
		}




		if(mozi == ' ' || mozi == '.' || mozi == '\n'){
			if(mozi == ' ' || mozi == '.'){
				trans[position] = mozi;
				position++;
			}

			if(mozi == '\n'){
				trans[position] = '\n';
				cout << trans << endl;
				first_check = 0;
				position = 0;
				memset(trans,'\0',sizeof(trans));
			}
		}else{
			for(int i=0;i<26;i++){
				if(data[i] == mozi){
					now = i;
					break;
				}
			}

			trans[position] = data[now - zoom];
			position++;

		}
	}
}

C++: #include<cstdio>
#include<cstring>
#include<cctype>
#include<iostream>

using namespace std;
int main(void)
{
	while(1)
	{
		char a[10000] = {0};
		if(gets(a) == NULL) break;
		int as = strlen(a);
		for(int i = 0;i < 26;i++)
		{
			if(strstr(a,"this") || strstr(a,"that") || strstr(a,"the")) break;
			for(int j = 0;j < as;j++)
			{
				if(isalpha(a[j]))
				{
					a[j] = (a[j] - 'a') % 26 + 'a';
				}
			}
		}
		printf("%s\n",a);
	}
	return 0;
}