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 <string>

int search_number(const std::string &s)
{
    for (unsigned i = 0; i < s.size() - 3; ++i) {
        if (s[i] - s[i + 1] == 't' - 'h'
                && s[i + 1] - s[i + 2] == 'h' - 'i'
                && s[i + 2] - s[i + 3] == 'i' - 's')
            return s[i] - 't';
    }
    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] -= n;
                if (s[i] < 'a') s[i] += 26;
                if (s[i] > 'z') s[i] -= 26;
            }
        }
        std::cout << s << std::endl;
    }
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
using namespace std;
int main() {
	string str;
	string w[3] = { "the","this",  "that" };
	while (getline(cin, str)) {
		if (str == "")break;
		while (true) {
			if (str.find("this") == string::npos &&
				str.find("the") == string::npos &&
				str.find("that") == string::npos ) {

				for (char &c : str) {
					if (c != ' ' && c != '.') {
						c = (c - 'a' + 1) % 26 + 'a';
					}
				}

			}
			else {
				break;
			}
		}
		cout << str << endl;
	}
}

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