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<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){
    if(howMuchWords(s, "that") || howMuchWords(s, "this") || howMuchWords(s, "the")){
      // cout << cnt << ": ";
      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 <string>
#include <iostream>
#include <algorithm>

using namespace std;

string dict = "abcdefghijklmnopqrstuvxwyz";

string decode(string s, int v) {
    string ans = s;
    for(int i = 0; i < (int) s.size(); i++) {
        if(s[i] >= 'a' && s[i] <= 'z') {
            ans[i] =  dict[((s[i] + v) % 26)];
        }
    }
    return ans;
}

int main() {
    string s;

    while(getline(cin, s)) {
        for(int i = 1; ; i++) {
            string tmp = decode(s, i);
            if(tmp.find("this") != string::npos && tmp.find("the") != string::npos && tmp.find("that") != string::npos) {
                cout << tmp << endl;
                break;
            }
         }
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    char line[100];
    int dist,a,b,h,e,i,s,t,aa;
    while(gets(line)){
        int l=strlen(line);
        //printf("length %d\n",l);
        char *token;
        token=strtok(line," ");
        while(token!=NULL) {//cout<<token<<" ";
            int tl=strlen(token);
            //printf("tl %d\n",tl);
            if(tl==3 || tl==4){
                if(tl==3){
                    a=abs(token[0]-'t');

                    h=token[1]-'a'-a;
                    h+=26;
                    h=h%26;

                    e=token[2]-'a'-a;
                    e+=26;
                    e=e%26;
                    if(h+'a'=='h' && e+'a'=='e'){

                        dist = a;
                        break;
                    }
                }
                if(tl==4){
                    a=abs(token[0]-'t');
                    //printf("a %d\n",a);

                    h=token[1]-'a'-a;
                    h+=26;
                    h=h%26;

                    i=token[2]-'a'-a;
                    i+=26;
                    i=i%26;

                    aa=token[2]-'a' -a;
                    aa+=26;
                    aa=aa%26;

                    s=token[3]-'a'-a;
                    s+=26;
                    s=s%26;

                    t=token[3]-'a' - a;
                    a += 26;
                    a = a%26;

                    if(h+'a'=='h' && (i+'a'=='i' ||aa+'a'=='a') && (s+'a'=='s' || t+'a'=='t')){

                        dist = a;
                        break;
                    }
                }
            }
            token=strtok(NULL," ");
            }

        //printf("length %d\n",dist);
            for(int i=0;i<l;i++){
            if(line[i]>='a' && line[i]<='z'){
                a=line[i]-'a';
                a=(a-dist);
                a+=26;
                a=a%26;
                line[i]='a'+a;
                printf("%c",a+'a');
            }
            else
                printf("%c",line[i]);
        }
        printf("\n");
    }

    return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main() {string here,ans;while (getline(cin,here)) for (int i=0;i<26;i++) {ans=here;for (int j=0;j<ans.size();j++) if (ans[j]>='a' && ans[j]<='z') ans[j]=(ans[j]-'a'+i)%26+'a';if (ans.find("that",0) != string::npos || ans.find("this",0) != string::npos || ans.find("the",0) != string::npos) {cout<<ans<<endl;break;}} return 0;}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <stdio.h>

using namespace std;

int main() {
    string a;
    
    getline(cin,a);
    
    while (1){
        if(a.find("this")!=-1 || a.find("the")!=-1 || a.find("that")!=-1){
            break;
        }
        
        for(int i=0; i<a.length(); i++){
            if(a[i]==' '|| a[i]=='.'){
                
            }else if(a[i]=='z'){
                a[i]='a';
            }else{
                a[i]++;
            }
        }

    }
    cout<<a<<endl;;
    
    
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<sstream>
int main()
{
	std::vector<std::string>result;
	for (std::string s; std::getline(std::cin, s);)
	{
		int delta = 0;
		std::stringstream ss;
		ss << s;
		while (!ss.eof())
		{
			std::string temp;
			ss >> temp;
			if (temp.length() == 3 && temp[0] != '.' && temp[1] != '.' && temp[2] != '.')
			{
				int d1 = temp[0] - 't';
				int d2 = temp[1] - 'h';
				int d3 = temp[2] - 'e';
				for (auto i : { &d1,&d2,&d3 })
				{
					if (*i < 0)
					{
						*i += 26;
					}
				}
				if (d1 == d2 && d2 == d3)
				{
					delta = d1;
					break;
				}
			}
			else if (temp.length() == 4 && temp[0] != '.' && temp[1] != '.' && temp[2] != '.' && temp[3] != '.')
			{
				int d1 = temp[0] - 't';
				int d2 = temp[1] - 'h';
				int d3 = temp[2] - 'i';
				int d4 = temp[3] - 's';
				for (auto i : { &d1,&d2,&d3,&d4 })
				{
					if (*i < 0)
					{
						*i += 26;
					}
				}
				if (d1 == d2 && d2 == d3 && d3 == d4)
				{
					delta = d1;
					break;
				}
				d1 = temp[0] - 't';
				d2 = temp[1] - 'h';
				d3 = temp[2] - 'a';
				d4 = temp[3] - 't';
				for (auto i : { &d1,&d2,&d3,&d4 })
				{
					if (*i < 0)
					{
						*i += 26;
					}
				}
				if (d1 == d2 && d2 == d3 && d3 == d4)
				{
					delta = d1;
					break;
				}
			}
		}
		if (delta > 0)
		{
			delta -= 26;
		}
		result.push_back(std::string(s.length(), 'a'));
		for (int i = 0; i < s.length(); i++)
		{
			result.back()[i] = 'a' <= s[i] && s[i] <= 'z' ? (s[i] - 'a' - delta) % 26 + 'a' : s[i];
		}
	}
	for (auto i : result)
	{
		std::cout << i << std::endl;
	}
	return 0;
}

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

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