Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if len(infos) == 0 {
			break
		}
		// 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>
#include<cstdio>
#include<cmath>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<string>
#include<utility>
#include<algorithm>
#include<functional>
#include<deque>
#include<string.h>
#include<ctype.h>
#include<time.h>
#include<stdlib.h>
using namespace std;

char c[85];

bool search_th(){
  bool f = false;
  for (int i = 0; i < strlen(c); i++){
    if ((c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'e') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'i' && c[i+3] == 's') ||
        (c[i] == 't' && c[i+1] == 'h' && c[i+2] == 'a' && c[i+3] == 't')){
          f = true;  break;
    }
  }
  return f;
}

int main(){
  while (cin.getline(c, sizeof(c))){
    while (1){
      if (search_th() == true){
      cout << c << endl;
      break;
      }
      for (int j = 0; j < strlen(c); j++){
        if (c[j] >= 'a' && c[j] <= 'y'){
          c[j]++;
        } else if (c[j] == 'z'){
          c[j] = 'a';
        }
      }
    }
    for (int i = strlen(c); i < 85; i++){
      c[i] = '\0';
    }
  }
  return 0;
}

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

C++: #include<iostream>
using namespace std;
int main()
{
	char key[100] = "";
	
	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)break;
			cout << key[i];
		}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
using namespace std;
bool is_ok(const string& s)
{
  return s.find("this")!=-1 || s.find("that")!=-1 || s.find("the")!=-1;
}
int main(void)
{
  string str;
  while( getline(cin,str) ) {
    while( !is_ok(str) ) {
      for(int i=0;i<int(str.size());i++){
	if( !isalpha(str[i]) ) continue;
	str[i]++;
	if(str[i]>'z') str[i]='a';
      }
    }
    cout << str << endl;
  }
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

string decode(string inp,int n){
    for(int i=0;i<inp.length();i++){
        if('a'<=inp[i]&&inp[i]<='z'){
            
            inp[i]=inp[i]-n;
            if(inp[i]<'a') inp[i]+=('z'-'b');
        }
    }
    return inp;
}
bool check(string inp){
    string word;
    stringstream ss(inp);
    while(getline(ss,word,' ')){
        if(word=="the"||word=="this"||word=="that"||word=="the."||word=="this."||word=="that.")
            return true;
    }
    return false;
}
int main(){
    string input,decoded;
        for(int i=0;i<26;i++){
            decoded=decode(input,i);
            if(check(decoded)){
                break;
            }
        }
        cout << decoded << endl;
    
    return 0;
}

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

int CheckDiff(string);
int ShowSourceString(string,int);
int main(){
	string str;
	while(getline(cin,str)){
		ShowSourceString(str,CheckDiff(str));
	}
	
	return 0;
}

int CheckDiff(string str){
	for( int i=0;i<(int)str.length();i++ ){
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('a'-'t'))&&
		    (str[i+3]-str[i]==('t'-'t'))
		){
			return str[i]-'t';
		}
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('i'-'t'))&&
		    (str[i+3]-str[i]==('s'-'t'))
		){
			return str[i]-'t';
		}
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('e'-'t'))
		){
			return str[i]-'t';
		}
	}
	throw "Bad request";
}
int ShowSourceString(string str,int diff){
	for( int i=0;i<(int)str.length();i++ ){
		if('a'<=str[i]&&str[i]<='z' ){
			if(str[i]-diff>'z'){
				cout<<(char)('a'+str[i]-diff-'z');			
			}else if(str[i]-diff<'a'){
				cout<<(char)('z'-('a'-(str[i]-diff)));			
			}else{
				cout<<(char)(str[i]-diff);
			}
		}else{
			cout<<(char)str[i];
		}
	}
	cout<<endl;
	return 0;
}

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

typedef pair<string, string> P;

P next_word(string sentence) {
  if (sentence.empty()) return make_pair(string(""), string(""));
  if (sentence[0] == ' ' || sentence[0] == '.') {
    return make_pair("", sentence.substr(1));
  } else {
    P recur = next_word(sentence.substr(1));
    return make_pair(sentence[0] + recur.first, recur.second);
  }
}

bool acceptable(string sentence) {
  P p = next_word(sentence);

  while (! p.first.empty() ) {
    if (p.first == "this" || p.first == "the" || p.first == "that")
      return true;

    p = next_word(p.second);
  }
  return false;
}

char slip(char c) {
  if (c < 'a' || 'z' < c) return c;
  
  string alphabet = "abcdefghijklmnopqrstuvwxyza";
  int index = (int)(c - 'a');
  return alphabet[index + 1];
}

char slip(char c, int n) {
  for (int i = 0; i < n; i++)
    c = slip(c);

  return c;
}

string slip(string code, int n) {
  string val;
  for (int i = 0, len = code.length(); i < len; i++)
    val += slip(code[i], n);

  return val;
}

string decode(string code) {
  for (int i = 1; i < 27; i++) {
    string sentence = slip(code, i);
    if (acceptable(sentence))
      return sentence;
  }

  return "";
}

int main() {
  string code;
  getline(cin, code);
  cout << decode(code) << endl;

}