Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
	char key[100] = "";
	
	while (cin.getline(key, sizeof(key))) {

		for (int i = 0; i < sizeof(key); i++)
		{
			//if (key[i] == (int)" ")cout << "space";
			if ((int)key[i] == 0)break;
			if ((int)key[i] <= 122 && (int)key[i] >= 97)
				key[i] = (int)key[i] - 1;
			if (key[i] == 96)key[i] = 122;
		}
		for (int i = 0; i < sizeof(key); i++)
		{
			if ((int)key[i] == 0)continue;
			cout << key[i];
		}
		for (int i = 0; i < sizeof(key); i++)
			key[i] = 0;
	}
	return 0;
}

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

std::string& test_decode(std::string& decoded_text)
{
	for (char& c : decoded_text) {
		if (c == 'a') {
			c = 'z';
		}
		else if (c != '.' && c != ' ') {
			c -= 1;
		}
	}
	return decoded_text;
}

int main()
{
	std::string encrypted_text;

	while (std::getline(std::cin, encrypted_text)) {
		do {
			test_decode(encrypted_text);
		} while (encrypted_text.find("the")  == std::string::npos &&
				 encrypted_text.find("this") == std::string::npos &&
				 encrypted_text.find("that") == std::string::npos);
		std::cout << encrypted_text << std::endl;
	}

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	char str[80];
	int num, num2;
	int i;
	
	while (fgets(str, 80, stdin) != NULL){
		num = 't' - str[0];
		printf("%d\n", num);
		i = 0;
		while (str[i] != '\0'){
			if (str[i] != '.' && str[i] != ' ' && str[i] != '\n'){
				str[i] += num;
				if (str[i] > 'z'){
					num2 = str[i] - 'z';
					str[i] = num2 + 'a' - 1;
				}
				else if (str[i] < 'a'){
					num2 = 'a' - str[i] - 204;
					str[i] = 'z' - num2 + 1;
				}
			}
			i++;
		}
		printf("%s", str);
	}
	
	printf("\n");
	
	return (0);
}

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

int main(void){
    char buf[128];
    bool found;
    
    while (gets(buf) != NULL){
        for(int i=0; i<26; i++){
            found = false;
            if (strstr(buf, "th")){
                found = (strstr(buf,"the") != NULL);
                found |= (strstr(buf,"this") != NULL);
                found |= (strstr(buf,"that") != NULL);
            }
            if (found) break;
            for (char *p = buf; *p != '\0'; p++){
                if (*p >= 'a' && *p <= 'z'){
                        *p = (*p - 'a' + 1) % 26 + 'a';
                }
            }
        }
        printf("%s\n",buf);
    }
    
    return 0;
}

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

char s1[100];
char s2[100];

int main()
{
	while(1)
	{
		if(NULL == fgets(s1,100,stdin))
		{
			break;
		}
		s1[strlen(s1) - 1] = '\0';
		int l = strlen(s1);
		for(int i = 0; i < 26; i++)
		{
			strcpy(s2,s1);
			for(int j = 0; j < l; j++)
			{
				if('a' <= s2[j] && s2[j] <= 'z')
				{
					s2[j] += i;
					if(s2[j] > 'z')
					{
						s2[j] -= 26;
					}
				}
			}
			if(NULL != strstr(s2,"the") || NULL != strstr(s2,"this") || NULL != strstr(s2,"that"))
			{
				printf("%s\n",s2);
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
#include <cmath>
#include <complex>
#include <map>
using namespace std;

#define rep(i,n) for(int i=0;i<int(n);++i)
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define EPS 1e-8
#define F first
#define S second

static const double PI=6*asin(0.5);
typedef long long ll;
typedef complex<double> CP;
typedef pair<long long,int> P;
static const int INF=1<<24;

string s;

int main(){
	while(getline(cin,s)){
		rep(i,s.size()){
			if(s[i]>='a'&&s[i]<='z'){
				s[i]-='a';
			}
			else if(s[i]==13){
				s[i]=200;
			}
		}
		for(int i=0;;i++){
			bool f=false;
			//cout<<s.size()<<endl;
			rep(j,s.size()-3){
				if(s[j]=='t'-'a'&&s[j+1]=='h'-'a'&&((s[j+2]==0&&s[j+3]=='t'-'a')||(s[j+2]=='i'-'a'&&s[j+3]=='s'-'a')||s[j+2]=='e'-'a')){
					f=true;
					break;
				}
			}
			if(s[s.size()-3]=='t'-'a'&&s[s.size()-2]=='h'-'a'&&s[s.size()-1]=='e'-'a') f=true;
			if(f) break;
			else{
				rep(j,s.size()){
					if(s[j]<='z'-'a'&&s[j]>=0){
						s[j]=(s[j]+1)%('z'-'a'+1);
					}
				}
			}
		}
		rep(i,s.size()){
			if(s[i]<='z'-'a'&&s[i]>=0){
				s[i]+='a';
			}
			else if(s[i]==200){
				s[i]=13;
			}
		}
		cout<<s<<endl;
			
	}
	return 0;
}

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  string s;
  while(getline(cin, s)){
    FOR(i, 1, 26){
      string t = s;
      string res = "";
      rep(j, t.size()){
        if(!('a' <= s[j] && s[j] <= 'z')){
          res += t[j];
        }else{
          res += char(((int(t[j] - 'a') + i) % 26) + 'a');
        }
      }
      string tmp = "";
      bool flag = false;
      rep(j, res.size()){
        if(res[j] != ' ')tmp += res[j];
        else{
          if(tmp == "the" || tmp == "this" || tmp == "that"){
            flag = true;
            break;
          }
          tmp = "";
        }
      }
      if(flag){
        cout << res << endl;
        break;
      }
    }
  }
	return 0;
}