Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

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)) {
		for (int i = 0; i <= 26; i++) {
			string newstr = str;
			for (int j = 0; j < str.size(); j++) {
				if ('a' <= newstr[j] && newstr[j] <= 'z') {
					newstr[j] = str[j] + i;
					if (newstr[j] > 'z') {
						newstr[j] -= 'z' + 1;
						newstr[j] += 'a';
					}
				}
			}
			//cerr << newstr << endl;
			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;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
	string s;
	while(getline(cin, s)){
		for(int i = 0; i < 26; i++){
			for(int i = 0; s[i] != '\0'; i++){
				if(s[i] >= 97 && s[i] <= 122) s[i] = (s[i] - 97 + 1) % 26 + 97;
			}
			if(s.find("th", 0) != -1){
				cout << s << endl;
				break;
			}
		}
	}
	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, 27){
      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] != ' ' && res[j] != '.')tmp += res[j];
        else{
          if(tmp == "the" || tmp == "this" || tmp == "that"){
            flag = true;
            break;
          }
          tmp = "";
        }
      }
      if(tmp == "the" || tmp == "this" || tmp == "that"){
        flag = true;
      }
      if(flag){
        cout << res << endl;
        break;
      }
    }
  }
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <sstream>

using namespace std;

bool is_comprehensible(const string& str){
	istringstream iss(str);
	string word;
	while(iss >> word){
		if(word == "the" || word == "this" || word == "that"){
			return true;
		}
	}
	return false;
}

string shift_string(const string& str, char n){
	string result;
	for(auto& v: str){
		if('a' <= v && v <= 'z'){
			result += (v - 'a' + n) % 26 + 'a';
		}
		else{
			result += v;
		}
	}
	return result;
}

int main(){
	string str;
	getline(cin, str);
	
	for(int i = 0; i < 26; ++i){
		auto shifted = shift_string(str, i);
		if(is_comprehensible(shifted)){
			cout << shifted << endl;
			break;
		}
	}
	return 0;
}

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;
}