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>

const char *table = "abcdefghijklmnopqrstuvwxyz";

int search_number(const std::string &s)
{
    const char *key = "this";
    for (unsigned i = 0; i < s.size() - 3; ++i) {
        if (s[i] > s[i + 1] && s[i] - s[i + 1] == key[0] - key[1]
                || s[i] < s[i + 1] && s[i + 1] - s[i] == 26 - (key[0] - key[1])) {
            int n = s[i] - key[0];
            if (table[(s[i + 2] - 'a' - n) % 26] == key[2]
                    && table[(s[i + 3] - 'a' - n) % 26] == key[3])
                return n;
        }
    }
    return 0;
}

int main()
{
    std::string s;
    while (getline(std::cin, s)) {
        int n = search_number(s);
        for (unsigned i = 0; i < s.size(); ++i) {
            if (s[i] != ' ' && s[i] != ',' && s[i] != '.') {
                s[i] = table[(s[i] - 'a' - n) % 26];
            }
        }
        std::cout << s << std::endl;
    }
}

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

char next(char c)
{
    if ('a' <= c && c <= 'y') {
        return c+1;
    } else if (c == 'z') {
        return 'a';
    }
    return c;
}

int main()
{
    char str[81];
    while(true) {
        if(!fgets(str,81,stdin)) break;
        for(int j=0;j<26;++j) {
            if (strstr(str, "the") || strstr(str, "this") || strstr(str, "that")) {
                break;
            }
            for(int k=0,len=strlen(str);k<len;++k) {
                str[k] = next(str[k]);
            }
        }
        fputs(str,stdout);
    }
    return 0;
}

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

int size;
string str;
void change()
{
  for (int i = 0; i < size; i++){
    if ('a' <= str[i] && str[i] <= 'y'){
      str[i]++;
    }
    else if (str[i] == 'z'){
      str[i] = 'a';
    }
  }
}

int main()
{
 // string str;

  while (getline(cin, str), str != ""){
    size = str.size();

    for (int i = 0; i < 24; i++){
      change();
      if (str.find("the") != -1 || str.find("this") != -1 || str.find("that") != -1){
        cout << str << endl;
        break;
      }
    }
    str = "";
  }
  return 0;
}

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

using namespace std;

int main(){
	const char *KEYWORDS[] = { "the", "this", "that" };
	string s;
	while(getline(cin, s)){
		for(int i = 0; i < 26; ++i){
			for(int j = 0; j < s.size(); ++j){
				if(islower(s[j])){ s[j] = (s[j] - 'a' + 1) % 26 + 'a'; }
			}
			bool accept = false;
			for(int j = 0; j < 3; ++j){
				if(s.find(KEYWORDS[j]) != string::npos){ accept = true; }
			}
			if(accept){ break; }
		}
		cout << s << endl;
	}
	return 0;
}

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

int main() {
  string str,s,newstr;
  int key,word;
  vector<string> seq;
  char decode[4],ans;
  while(getline(cin,str)) {
    stringstream ss;
    ss << str;
    while(ss >> s) {
      seq.push_back(s);
    }
    ss.str("");
    ss.clear(stringstream::goodbit);

    word = seq.size();
    key = 100;

    for(int i=0;i<word;i++) {
      if(seq[i].size() == 4) {// ??that.
	decode[0] = *seq[i].substr(0,1).c_str();
	decode[1] = *seq[i].substr(1,1).c_str();
	decode[2] = *seq[i].substr(2,1).c_str();
	decode[3] = *seq[i].substr(3,1).c_str();

	for(int j=1;j<27;j++) {
	  for(int k=0;k<4;k++) {
	    decode[k] -= 97; //a-z 0-25
	    decode[k] ++;//1-26
	    decode[k] %= 26;//0-25
	    decode[k] += 97;//97-122
	  }
	  if(decode[0] == 't' && decode[1] == 'h' && decode[2] == 'i' && decode[3] == 's') {
	    key = j;
	    break;
	  }
	  if(decode[0] == 't' && decode[1] == 'h' && decode[2] == 'a' && decode[3] == 't') {
	    key = j;
	    break;
	  }
	}
      }
      if(key!=100) break;
    }
    cout << key << endl;
    for(int i=0;i<word;i++) {
      for(int j=0;j<seq[i].size();j++) {
	ans = *seq[i].substr(j,1).c_str();
	if(ans <= 'z' && 'a' <= ans){
	  ans -= 97;
	  ans += key;
	  ans %= 26;
	  ans += 97;
	}
	cout << ans;
      }
      cout << " ";
    }
    cout << endl;
  }
}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define np string::npos
#define X real()
#define Y imag()
#define value(x,y,w,h) (x >= 0 && x < w && y >= 0 && y < h)
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define repc(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

typedef long long ll ;
typedef deque<int> di ;
typedef deque<ll> dl ;
typedef map<string,int> dict;
typedef complex<double> comd;
typedef pair<int,int> pii;

constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0};
const int dx[] = {0,-1,0,1};

double CalcDist(comd p1, comd p2){
  return sqrt(pow(p1.X - p2.X,2.0) + pow(p1.Y -p2.Y,2.0));
}

  template <typename T>
void out(deque < T > d)
{
  for(size_t i = 0; i < d.size(); i++)
  {
    debug(d[i]);
  }
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

string Decode(string s, int n){
  string res = s;
  rep(i,s.size()){
    if(s[i] != '.' && s[i] != ' '){
      if(s[i] + n > 'z'){
        res[i] = 'a' + (s[i] + n - 'z')-1;
      }
      else{
        res[i] = s[i] + n;
      }
    }
  }
  return res;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  string s;
  int code;
  vector<string> vs;
  while(1){
    code = 0;
    getline(cin,s);
    if(cin.eof()) break;
    rep(i,27){
      if(Decode(s,i).find("this") != string::npos ||Decode(s,i).find("that") != string::npos||Decode(s,i).find("thread_local") != string::npos){
        code = i;
        break;
      }
    }
    cout << Decode(s,code) << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <string.h>
using namespace std;
int main(){
	string alpha = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
	string str;
	while( 1 ){
		if( getline( cin, str ).eof() ) break;
		for( int a = 0; a < 26; a++ ){
			for( int i = 0; i < str.length(); i++ ){
				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;
	}
}