Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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") != string::npos || str.find("this") != string::npos || str.find("that") != string::npos )
			{
				cout << str << endl;
				return 0;
			}
		}
	}

	return 0;
}

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

int main(){
	int i, j;
	string input, s;
	while(getline(cin, input)){
		for (i = 0; i < 26; i++) {
			s = input;
			for(j = 0; j < s.length(); j++){
				if(s[j] != '.' && s[j] != ' '){
					s[j] = s[j] - i;
				}
			}
			if(s.find("the")!=string::npos || s.find("this")!=string::npos || s.find("that")!=string::npos){
				cout << s << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
using namespace std;
typedef pair<int,char*> str;

int main(void){
	char s[81];
	vector<str> v;
	const char* cmp1="that";
	const char* cmp2="this";
	const char* cmp3="the";
	bool is_found=false;
	int pos=0,end_pos,diff;
	char c;

	scanf("%[^\n]",s);
	for(int i=0;i<81;i++){
		if(s[i]==' ' || s[i]=='.'){
			s[i]='\0';
			v.push_back(str(i-1-pos,s+pos));
			pos=i+1;
		}else if(s[i]=='\0'){
			end_pos=i;
			break;
		}
	}

	for(int i=0;i<v.size();i++){
		is_found=false;

		diff=1000;
		if(v[i].first==4){
			for(int j=0;j<4;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp1[j];
				}else if(diff!=v[i].second[j]-cmp1[j]){
					is_found=true;
					break;
				}
			}

			if(!is_found) break;

			diff=1000;
			for(int j=0;j<4 && !is_found;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp2[j];
				}else if(diff!=v[i].second[j]-cmp2[j]){
					is_found=true;
					break;
				}
			}

			if(!is_found) break;
		}else if(v[i].first==3){
			diff=1000;
			for(int j=0;j<3;j++){
				if(diff==1000){
					diff=v[i].second[j]-cmp2[j];
				}else if(diff!=v[i].second[j]-cmp2[j]){
					is_found=true;
					break;
				}
			}
			if(!is_found) break;
		}
	}
	
	for(int i=0;i<end_pos;i++){
		if(s[i]=='\0'){
			if(i==end_pos-1){
				s[i]='.';
			}else{
				s[i]=' ';
			}
		}else{
			s[i]-=diff;
		}
	}

	printf("%s\n",s);


	return 0;
}

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

int main(){

	string code;

	while( getline(cin, code) ){

		for( int j=0;j<25;j++ ){
			for( int i=0;i<code.size();i++ ){
				if( code[i] >= 'a' && code[i] <= 'z' ){
					code[i] += 1;
					if(code[i]=='z'+1)code[i]='a';
				}
			}
			if(code.find("the ") != -1 || code.find("this") != -1 || code.find("that") != -1)
				break;		
		}
		cout << code << endl;
	}
	return 0;

}

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

int main()
{
	string str;
	while(getline(cin,str)){
		int l,m;
		l = static_cast<int>(str[0] - 't');
		m = static_cast<int>(str[1] - 'h');
		char a = static_cast<char>(static_cast<int>(str[2])-l);
		char b = static_cast<char>(static_cast<int>(str[3])-l);
		if(l == m && ( a=='e' || (a=='i'&&b=='s') || (a=='a'&& b=='t'))){
			for(unsigned i=0;i<str.size();i++){
				if(islower(str[i])){
					char c = static_cast<char>(static_cast<int>(str[i])-l);
					if(c<'a')
						c += 26;
					else if(c>'z')
						c-=26;
					cout << c;
				}else{
					cout << str[i];
				}
			}
			cout << endl;
		}
	}
	return 0;
}

C++: // #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
#include <vector>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cmath>
using namespace std;

string nextChar(string in){
	for (int i = 0; i < in.length(); i++){
		// アルファベットなら
		if (in[i] >= 97 && in[i] <= 122){
			// 次に進める
			in[i]++;
			if (in[i] == 123)	in[i] = 97;
		}
	}
	return in;
}

int main(){
	string in;
	while (getline(cin, in)){
		while (1){
			in = nextChar(in);
			if (in.find("the") != string::npos || 
				in.find("this") != string::npos || 
				in.find("that") != string::npos){
				cout << in << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main( void )
{
	// ³ê½f[^É the, this, that Ì¢¸ê©ªÜÜêéÈçÎ
	// »êðoÍµÄI¹·éÆ¢¤àÌÅµå¤B

	string keys[3] = { "the", "this", "that" };
	string input;
	while ( cin.eof() == false )
	{
		getline( cin, input );
		for ( int i = 0; i <= 26; i++ )
		{
			for ( string::iterator it = input.begin(); it != input.end(); it++ )
			{
				if ( *it == '\n' ) it = input.erase( it );
				if ( 'a' <= *it && *it <= 'z' )
				{
					(*it)++;
					if ( *it > 'z' ) *it = 'a';
				}
			}
			bool not_found = true;
			for ( int j = 0; not_found && j < 3; j++ )
			{
				if ( input.find( keys[j] ) != string::npos ) not_found = false;
			}
			if ( not_found == false )
			{
				cout << input << endl;
				break;
			}
		}
	}

	return 0;
}