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++: #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 );
	}
	bool f = 0;
	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 )
			{
				f = 1;
			}
		}
		if( f )
		{
			for( auto P : data )
			{
				cout << P << endl;
			}
			return 0;
		}
	}
}

C++: /*AOJ 0017*/

#include<iostream>
#include<string>

using namespace std;

char shiftCaesar(char tmp){
	if(tmp>='a' && tmp<= 'y'){
		return tmp+1;
	}
	else if(tmp == 'z'){
		return 'a';
	}
	else{
		return tmp;
	}
}

int main(){
	char str[100];
	string tmp;

	while(cin.getline(str,100,'.')){

		for(;;){
			for(int i=0;str[i]!='\0';i++){
				str[i] = shiftCaesar(str[i]);
			}

			tmp = str;

			if( tmp.find("the") != -1 || tmp.find("this") != -1 || 
				tmp.find("that") != -1){
					break;
			}


		}

		cout<<tmp<<"."<<endl;

	}
	return 0;
}

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

int main()
{
	string n;
	while(getline(cin,n))
	{
		for(int i=0;i<26;i++)
		{
			string ans;
			for(int j=0;j<n.size();j++)
			{
				ans+=n[j];
				if('a'<=ans[j]&&ans[j]<='z')
				{
					ans[j]-=i;
					if(ans[j]<'a') ans[j]+=26;
				}
			}
			if(ans.find("the")!=-1||ans.find("this")!=-1||ans.find("that")!=-1)
			{
				cout<<ans<<endl;
				break;
			}
		}
	}
	return 0;
}

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

using namespace std;
string buf;
bool found(){
    return buf.find("this",0) != string::npos ||
        buf.find("that",0) != string::npos ||
        buf.find("the",0) != string::npos;
}

bool isalpha(char c){
    return 'a' <= c && c <= 'z';
}

int main(){
    while(getline(cin, buf)){
        while(!found()){
            for(int i=0; i<buf.size(); i++){
                if(isalpha(buf[i])) buf[i]++;
                if(buf[i] == 'z'+1) buf[i] = 'a';
            }
        }
        cout << buf << endl;
    }
}

C++: int main(){
  return 0;
}

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

using namespace std;

int main()
{
	string str;

	while ( getline( cin, str ) )
	{
		for ( unsigned int i = 0; i < 26; i++ )
		{
			for ( unsigned int i = 0; i < str.length(); i++ )
			{
				if ( 'a' <= str[i] && str[i] <= 'z' )
				{
					str[i]++;
					if ( 'z' <= str[i] )
					{
						str[i] -= 'z' - 'a';
					}
				}
			}

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

	return 0;
}

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

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

	return 0;
}

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

int cmp(string s){
	if(s.find("that",0)!=string::npos) return 1;
	if(s.find("the",0)!=string::npos) return 1;
	if(s.find("this",0)!=string::npos) return 1;
	return 0;
}

int main() {
	string s;
	while(getline(cin,s)){
		for(int h=0;h<26;h++){
			for(unsigned int i=0;i<s.length();i++){
					if(s[i]==0x2e||s[i]==0x20||s[i]==0x0a) continue;
					s[i]+=1;
					if((int)s[i]>0x7a) s[i]=0x61;
			}if(cmp(s)==1) break;
		} cout<<s<<endl;
	}return 0;
}

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

using namespace std;

void forward(string& data)
{
	for(auto& c : data)
	{
		if(c < 'a' || 'z' < c)
			continue;

		c++;
		if('z' < c)
			c -= 26;
	}
}

bool test(const string& data)
{
	if(data.find("the") != string::npos)
		return true;
	if(data.find("this") != string::npos)
		return true;
	if(data.find("that") != string::npos)
		return true;

	return false;
}

int main()
{
	string line;
	while(getline(cin, line))
	{
		for(int i = 0; i < 26; i++)
		{
			if(test(line))
				break;
			forward(line);
		}

		cout << line << endl;
	}

	return 0;
}