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<cstdio>
#include<string>
#include<cstring>
#include<vector>
using namespace std;
int word_search(vector<string> s,  string key){
    for(int i = 0; i < s.size(); i++){
        if(s[i].length() <= 2 || s[i].length() >= 6) continue;
        for(int j = 0; j < s[i].length() - 1; j++)
            if(s[i][j] == '.') continue;
        if(s[i][s[i].length() - 1] == '.') s[i].erase(s[i].end() - 1);
        for(int j = 0; j < 26; j++){
            string turned_word;
            for(int k = 0; k < s[i].length(); k++){
                turned_word.push_back((s[i][k] + j - 'a') % 26 + 'a');
            }
            if(turned_word == key) return j;
        }
    }
    return -1;
}
int main(){
    for(;;){
        char line[200];
        if(fgets(line, sizeof(line), stdin) == NULL) break;
        vector<string> s;
        char *token = strtok(line, " ");
        s.push_back(token);
        for(;;){
            token = strtok(NULL, " ");
            if(token == NULL) break;
            s.push_back(token);
        }
        int num;
        if(word_search(s, "the") != -1) num = word_search(s, "the");
        if(word_search(s, "this") != -1) num = word_search(s, "this");
        if(word_search(s, "that") != -1) num = word_search(s, "that");
        for(int i = 0; i < s.size(); i++){
            for(int j = 0; j < s[i].length(); j++){
                if(s[i][j] == '.') cout << '.';
                else if(s[i][j] == '\n') continue;
                else cout << (char)((s[i][j] + num - 'a') % 26 + 'a');
            }
            cout << ' ';
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int caesar(char s[]);
bool search(string s);

int main(){
	string str;
	int i;
	while(getline(cin,str)){
		int j=0;
		while(!search(str)){
			for(i=0;str[i]!='.';i++){
				if(str[i]!=' ') str[i]++;
				if(str[i]>122) str[i]=97;
			}
			j++;
			if(j>25) break;
		}
		cout << str << endl;
	}
	return 0;
}

bool search(string s){
	if(s.find("this")!=string::npos) return true;
	if(s.find("that")!=string::npos) return true;
	if(s.find("the")!=string::npos) return true;
	return false;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
#define INF 1000000000;
using namespace std;
int main() {
  string n;
  while (getline(cin, n)) {
    string ans = n;
    for (int i = 0; i < 26; i++) {
      if (ans.find("the") != -1 || ans.find("that") != -1 ||
          ans.find("this") != -1)
        break;
      for (int j = 0; j < ans.size(); j++) {
        if (ans[j] == ' ' || ans[j] == '.')
          continue;
        if (ans[j] == 'z')
          ans[j] = 'a';
        else
          ans[j]++;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;

#define PI 3.1415926535897932
// #54797
int main(){
    int len,flg;
    char s[84];
    while (fgets(s,84,stdin)!=NULL) {
        len=strlen(s)-1;
        flg=1;

        while (flg) {
            for (int i=0;i<len;i++) {
                if (islower(s[i])) {
                    s[i]=(s[i]-'a'+1)%26+'a';
                }
            }
            for (int i=0;i<len;i++) {
                if (!strncmp(&s[i],"the",3) || !strncmp(&s[i],"this",4) || !strncmp(&s[i],"that",4)) {
                    flg=0;
                    break;
                }
            }
        }
        printf("%s",s);
    }
    return 0;
}

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

bool howMuchWords(string s, string key){
  string::size_type index = s.find(key);
  if(index == string::npos){
    return false;
  }else{
    //???????????£???.
    return true;
  }
}
    

int main(){
  string s;
  getline(cin ,s);
  int cnt=0;
  
  
  while(true){
    bool flag=false;
    for(int i=0;i<s.length();i++){
      string key1 = s.substr(i,3);
      string key2 = s.substr(i,4);
    // if(howMuchWords(s, "that") || howMuchWords(s, "this") || howMuchWords(s, "the")){
      // cout << cnt << ": ";
      // cout << s << endl;
      // break;
      if(key1 == "the" || key2 == "this" || key2 == "that"){
	flag = true;
	break;
      }
    }
    
    if(flag){
      cout << s << endl;
      break;
    }
    
    for(int i=0;i<s.length();i++){
      if(s[i] > 'a' && s[i] < 'z'){
	s[i] -= 'a';
	s[i] -= 1;
	if(s[i] < 0){
	  s[i] += 'A' - 'a';
	}
	s[i] += 'a';
      }
    }
    
  }
}

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

std::string str;

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

	return 0;
}