Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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 scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// 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 <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++) 
#define ALL(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
    string S;
    while( getline( cin, S ) )
    {
        while( S.find( "the" ) != string::npos || S.find( "this" ) != string::npos || S.find( "that" ) != string::npos )
        {
            REP( i, (int)S.size() )
            {
                if( S[ i ] != ' ' && S[ i ] != '.' )
                {
                    if( S[ i ] == 'z' )
                    {
                        S[ i ] = 'a';
                        continue;
                    }
                    S[ i ]++;
                }
            }
        }
        cout << S << endl;
    }
    return 0;
}

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

/*他人のパクリ　アスキーコードの文字から数値への変換が出来なかった*/
int main() {
	string ac;
	while (getline(cin, ac)) {
		while ((ac.find("the") == -1) && (ac.find("this")==-1) && (ac.find("that") == -1)) {
			for (int i = 0; i < ac.size(); i++) {
				if ('a' <= ac[i] && ac[i] < 'z') {
					ac[i] += 1;
				}
				else if (ac[i]=='z'){
					ac[i] = 'a';
				}
			}

		}
		cout << ac << endl;
	}
	return 0;
}

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

int main(void){
  int len, cnt;
  string str;

  while(getline( cin, str )){
    len = str.length();
    cnt = 0;

    while(true){
      if( str.find("the", 0) != string::npos
	  || str.find("this", 0) != string::npos 
	  || str.find("that", 0) != string::npos
	)
	break;
      for(int i = 0; i < len; i++){
	if( 'a' <= str[i] && str[i] <= 'z' ){
	  str[i]++;
	  if(str[i] > 'z')
	    str[i] = 'a';
	}
      }
      
      cnt++;
      if(cnt > 30)
	break;
    }
    
    cout << str << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
bool isAlpha(char c){
	return ('a' <= c && c <= 'z');
}
char getShift(char c, int v){
	if (0 == v) return c;
	return char('a' + int(c + v + 26 - 'a') % 26);
}
int getShiftIndex(string& line){
	int s = line.size();
	string::size_type ps = 0, pe = 0;
	while (true){
		while (ps < s && !isAlpha(line[ps])) ++ps;
		pe = ps;
		while (pe < s && isAlpha(line[pe])) ++pe;
		if (ps >= s || pe >= s)
			break;
		int len = pe - ps;
		if (3 == len){
			if(	   line[ps] == getShift(line[ps + 1], 12)
				&& line[ps] == getShift(line[ps + 2], 15))
				return int('t' - char(line[ps]));
		}
		else if (4 == len){
			if(	   line[ps] == getShift(line[ps + 1], 12)
				&& line[ps] == getShift(line[ps + 2], 11)
				&& line[ps] == getShift(line[ps + 3], 1))
				return int('t' - char(line[ps]));
			if (   line[ps] == getShift(line[ps + 1], 12)
				&& line[ps] == getShift(line[ps + 2], 19)
				&& line[ps] == getShift(line[ps + 3], 0))
				return int('t' - char(line[ps]));
		}
		ps = pe;
	}
	return -1;
}

int main()
{
	string line;
	while (std::getline(cin, line)){
		int s = line.size();
		int v = getShiftIndex(line);
		for (int i = 0; i < s; ++i){
			char c = line[i];
			if (isAlpha(c)) cout << getShift(c, v);
			else cout << c;
		}
		cout << "\n";
	}
	return 0;
}

C++: #ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;


int main ()
{
	string str , str2;
	vector<string>data;
	while( getline ( cin , str2 ) )
	{
		data.push_back ( str2 );
	}
	for( size_t i = 0; i < 26; i++ )
	{
		for( auto &y : data )
		{
			for( auto &x : y )
			{
				if( x <= 'z'&&'a' <= x )
				{
					x -= 'a';
					x += 1;
					x %= 26;
					x += 'a';
				}
			}
			
			if( y.find ( "the" ) != string::npos || y.find ( "this" ) != string::npos || y.find ( "that" ) != string::npos )
			{
				for( auto P : data )
				{
					cout << P << endl;
				}
				return 0;
			}
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(n); i++)
#define REP2(i,x,n) for(int i=x; i<(n); i++) 
#define ALL(n) begin(n),end(n)
struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
int main()
{
	string S;
	while( getline( cin, S ) )
	{
		while( true )
		{
			REP( i, (int)S.size() )
			{
				if( S[ i ] != ' ' && S[ i ] != '.' )
				{
					if( S[ i ] == 'z' )
					{
						S[ i ] = 'a';
						continue;
					}
					S[ i ]++;
				}
			}
			if( S.find( "the" ) != string::npos || S.find( "this" ) != string::npos || S.find( "that" ) != string::npos )
			{
				break;
			}
		}
		cout << S << endl;
	}
	return 0;
}