Go: package main

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

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 reflect.DeepEqual(infos, []string{}) {
			break
		}
		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>
#include <string>
#include <string.h>
using namespace std;
int main(){
	string alpha = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string str;
	getline( cin, str );
	for( int a = 0; a < 26; a++ ){
		for( int i = 0; i < str.length(); i++ ){
			//if( str[i] == ' ' ) cout << ' ';
			for( int j = 0; j < alpha.length(); j++ ){
				if( str[i] == alpha[j] ){
					str[i] = alpha[j + 1];
					break;
				}
			}
		}
		/*char word = strtok( str.c_str(), " " );
		if( word == "the" || word == "that" || word == "this" ) break;
		while( word == NULL ){
			word = strtok( NULL, ' ' );
			if( word == "the" || word == "that" || word == "this" ) goto end;
		}*/
		if( str.find("the") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos ){
			break;
		}
	}
	cout << str << endl;
}

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



char slide(char ch, int dif) {
  if( ! isalpha(ch) ) return ch;

  int n = ch - 'a';
  n = (n + dif ) % 26;
  return 'a' + n;
}

int main() {
  for(string line; getline(cin, line); ){
  
  for(int dif = 0; dif < 26; dif++) {
    string str = line;
    
    for(int i = 0; i < (int)str.size(); i++) 
      str[i] = slide( str[i], dif);

    if( str.find("the") != string::npos ||
        str.find("this") != string::npos ||
        str.find("that") != string::npos ) {
      cout << str << endl;
      break;
    }
  }
    
} 
}

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

int main() {
  char buf[82];
  char *p;
  int l;
  string str;

  cin.getline(buf, 82);
  l = strlen(buf);

  for (int i=0; i<26; i++) {
    for (int j=0; j<l; j++) {
      if (buf[j]>='a' && buf[j]<='z') {
        buf[j] = (buf[j]-'a'+1)%26 + 'a';
      }
    }
    str.assign(buf);
    if (str.find("the")!=string::npos ||
        str.find("this")!=string::npos ||
        str.find("that")!=string::npos) {
      break;
    }
  }

  cout << str << endl;
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

string func(string s){
	for(int i=0;i<s.size();i++){
		if('a'<=s[i] && s[i]<='y')s[i]++;
		else if(s[i]=='z')s[i]='a';
	}
	return s;
}

int main(){
	
	string s;
	while(getline(cin,s)){
		while(true){
			if(s.find("the")!=string::npos)break;
			if(s.find("this")!=string::npos)break;
			if(s.find("that")!=string::npos)break;
			s=func(s);
		}
		cout<<s<<endl;
	}
	
	return 0;
}

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

bool is_contain_keywords(string str,vector<string>& keywords) {
  int cnt = 0;
  vector<string>::iterator key_itr = keywords.begin();
  while(key_itr != keywords.end()) {
    if(str.find(*key_itr) != string::npos) {
      return true;
    }
    key_itr++;
  }
  return false;
}

string decode(string cipher) {
  vector<string> keywords;
  keywords.push_back("the");
  keywords.push_back("this");
  keywords.push_back("that");

  int remind_shift = -1;
  int max_cnt = 0;
  int str_len = cipher.length();
  for(int shift = 0;shift < 'z' - 'a' + 1;shift++) {
    string str = cipher;
    for(int i=0;i<str_len;i++) {
      if('a' <= cipher[i] && cipher[i] <= 'z') {
        str[i] = (cipher[i] - 'a' + shift) % ('z' - 'a' + 1) + 'a';
      }
    }
    if(is_contain_keywords(str,keywords)) return str;
  }
  return "";
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);

  string cipher;
  while(getline(cin,cipher)) {
    cout << decode(cipher) << endl;
  }
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>

using namespace std;

int main()
{
	string str;
	while(getline(cin,str)){
		for(int rot = 0;rot< 'z' - 'a' + 1;rot++){
			string tmp = str;
			for(int i=0; i<str.size() - 1; i++){
				if(tmp[i] == ' ') continue;
				tmp[i] = (rot + tmp[i]-'a') % ('z' - 'a' + 1) + 'a';
			}
			//cout << tmp << endl;
			if(tmp.find("the") != string::npos
				|| tmp.find("this") != string::npos
				|| tmp.find("that") != string::npos)
			{
				cout << tmp << endl;
			}
		}
	}
	return 0;
}

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

using namespace std;

int main() {
    string s;
    int len;
    
    while (getline(cin, s)) {
        while (1) {
            len = s.size();
            for (int i = 0; i < len; i++) {
                if ('a' <= s[i] && s[i] <= 'z') {
                    if (s[i] == 'a') {
                        s[i] = 'z';
                    }
                    else {
                        s[i]--;
                    }
                }
            }
            if (s.find("the") >= 0 || s.find("this") >= 0 || s.find("that") >= 0) {
                cout << s << endl;
                break;
            }
        }
    }

    return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <string>
#include <climits>
#include <iomanip>
#include <utility>

#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define PRINT(STR) cout << (STR) << endl
#define DEBUG(X) cerr << X << " (" << __LINE__ << ", " << __func__ << " )" << endl;

typedef long long ll;
using namespace std;

int main() {
	cin.tie(0); //?????±?????????????????????
	ios::sync_with_stdio(false); //printf??¨??±??????????????????
	string str;
	while (getline(cin, str)) {
		string newstr = str;
		for (int i = -26; i <= 26; i++) {
			for (int j = 0; j < str.size(); j++) {
				if (newstr[j] != ' ' && newstr[j] != '.' && newstr[j] != '\n') {
					newstr[j] = str[j] + i;
				}
			}
			if (newstr.find("the", 0) != string::npos ||
					newstr.find("this", 0) != string::npos ||
					newstr.find("that", 0) != string::npos) {
				cout << newstr << endl;
				break;
			}
		}
	}
	return 0;
}