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<iomanip>
#include<memory>
#include<array>
#include<vector>
#include<queue>
#include<list>
#include<stack>
#include<algorithm>
#include<cmath>

using namespace std;

int chipher( string& s )
{
  for ( auto& c : s )
    {
      if ( c >= 'a' && c <= 'y' )
        ++c;
      else if ( c == 'z' )
        c = 'a';
    }
  return 0;
}

int main()
{
  
  string x;

  getline(cin, x);

  for ( int i = 0; i < 26; ++i )
    {
      if ( x.find( "the" ) != string::npos )
        cout << x << endl;
      else if ( x.find( "this" ) != string::npos )
        cout << x << endl;
      else if ( x.find( "that" ) != string::npos )
        cout << x << endl;
      chipher( x );
    }
  
  return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back
#define F first
#define S second


typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

string convi(string s, int n) {
	string re;
	rep(i, sz(s)) {
		if (islower(s[i])) {
			int a = (int)(s[i]) + n;
			if (a > 122)a -= (a - 122 + 26 - 1) / 26 * 26;
			re += (char)a;
		}
		else {
			re += s[i];
		}
	}
	return re;
}

VS split(string str, char del) {
	VS re;
	string sub;
	for (char c : str) {
		if (c == del) {
			re.pb(sub);
			sub.clear();
		}
		else {
			sub += c;
		}
	}
	re.pb(sub);
	return re;
}

bool check(string s, string t) {
	string s2, t2;
	rep(i, sz(s)) {
		if (s[i] != '.')s2 += s[i];
	}
	rep(i, sz(t)) {
		if (t[i] != '.')t2 += t[i];
	}
	return s2 == t2;
}
int main() {
	string s;
	while (getline(cin, s)) {
		rep(i, 26) {
			string s2 = convi(s, i);
			VS sub = split(s2, ' ');
			VS ch = { "the","this","that" };
			bool flag = false;
			
			rep(j, sz(sub))rep(k, 3) {
				if (check(sub[j],ch[k]))flag = true;
			}

			if (flag) { cout << s2 << endl; break; }
		}
	}
}
/*
A:65
Z:90
a:97
z:122
*/

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

int main(void)
{
	string s;
	getline(cin, s);
	int diff='t'-s[0];

	for(int i=0; i<s.length(); i++)
	{
		if(s[i]!=' ' && s[i]!='.')
			s[i] += diff;
	}
	cout << s << endl;

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cmath>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <map>

using namespace std;
typedef long long ll;

int main(){
    int in;
    char S[1000];
    
    for(int i=0;;i++){
        
        in = getchar();
        
        if(in==EOF){
            S[i]='\0';
            break;
        }else{
            S[i]=(char)in;
        }
    }
    
    for(int k=0;;k++){
        
        bool f = false;
        
        for(int i=0;;i++){
            if('a'<=S[i] && S[i]<='y'){
                S[i]++;
            }else if(S[i]=='z'){
                S[i]='a';
            }
            
            if(i>=3 && !('a'<=S[i] && S[i]<='z')){
                if(S[i-3]=='t' && S[i-2]=='h' && S[i-1]=='e')
                    f=true;
            }
            if(i>=4 && !('a'<=S[i] && S[i]<='z')){
                if(S[i-4]=='t' && S[i-3]=='h')
                    if((S[i-2]=='i' && S[i-1]=='s') || (S[i-2]=='a' && S[i-1]=='t'))
                        f=true;
            }
            
            if(S[i]=='\0') break;
        }
        
        if(f) break;
    }
    
    for(int i=0;S[i]!='\0';i++)
        printf("%c",S[i]);
    
    return 0;
}

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

C++: #include <iostream>
#include <string>
using namespace std;
int main( void )
{
  string s;
  while( 1 ){
    getline( cin, s );
    if( cin.eof() ) break;
    while( 1 ){
      for( int i=0; i<s.size(); i++ ){
        if( s[i] == 'z' ) s[i] = 'a';
        else if( 'a' <= s[i] && s[i] < 'z' ) s[i]++;
      }
      if( s.find( "the",  0 ) != string::npos ){ cout << s << endl; break; }
      if( s.find( "this", 0 ) != string::npos ){ cout << s << endl; break; }
      if( s.find( "that", 0 ) != string::npos ){ cout << s << endl; break; }
    }
  }
  return 0;
}

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

int find_cnt;
string find_str;

bool find(string str, string can) {
  string tmp_can = ' ' + can + ' ';
  string tmp_str = ' ' + str + ' ';
  int cnt = 0;
  for (int i = 0; i < tmp_str.length(); ++i) {
    if (string::npos != tmp_str.find(tmp_can, i)) {
      cnt++;
    }
  }
  if (find_cnt < cnt) {
    find_cnt = cnt;
    find_str = str;
  }
  return false;
}

int main() {
  string str;
  string candies[] = {"this", "the", "that"};
  while(getline(cin, str)) {
    find_cnt = 0;
    find_str = "";
  for (int m = 1; m < 26; ++m) {
    for (int i = 0; i < str.length(); ++i) {
      if (str[i] == ' ') {
        continue;
      }
      if (str[i] == ',' || str[i] == '.') {
        str[i] = ' ';
        continue;
      }
      if (m != 1) {
        int char_id = static_cast<int>(str[i]) - 97;
        int shifted = static_cast<int>(char_id + 1);
        str[i] = static_cast<char>(shifted % 26 + 97);
      }
    }
    for (int i = 0; i < sizeof(candies) / sizeof(candies[0]); ++i) {
      find(str, candies[i]);
    }
  }
  if (find_str != "") { 
    cout << find_str << endl;
  }
  }
  return 0;
}