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

C++: #include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <memory.h>
#include <map>
#include <math.h>
#include <utility>
#include <set>

#pragma warning(disable:4996)
using namespace std;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
const double PI = 3.141592653589793238;
const Int INF = 999999999999;
typedef pair<int, int> P;

vector<string> aa;

int main()
{
	string a;

	getline(cin, a);
	auto left = a.begin();
	
	while (true){
		auto right = left;
		while (right != a.end() && *right != ' ')++right;

		aa.emplace_back(left,right);
		if (right == a.end())
			break;

		left = right+1;
	}
	

	string c[3] = { "this", "that" , "the"};

	vector<string> nn;
	vector<string> kk;
	for (auto x : aa){
		auto n = x.length();
		if (n == 3){
			kk.push_back(x);
		}
		if (n == 4){
			nn.push_back(x);
		}
	}

	for (auto x : kk){
		auto n1 = x[0] - c[2][0];
		bool f(true);

		for (int i = 1; i < 3; ++i){
			if (n1 != x[i] - c[2][i])
				f = false;
		}

		if (f){
			int i(0);
			for (auto x : aa){
				for (auto y : x){
					if (y == '.'){
						std::cout << y;
						continue;
					}

					int q = y - 'a';
					if (q - n1 < 0){
						q = 26 - n1;
					}
					else
						q -= n1;

					std::cout << (char)(q + 'a');
				}
				if (i < aa.size() - 1)
					std::cout << " ";
				++i;
			}
			std::cout << endl;
			return 0;
		}
	}

	for (auto x : nn){
		auto n1 = x[0] - c[0][0];
		auto n2 = x[0] - c[1][0];
		bool f(true);
		bool f2(true);

		for (int i = 1; i < 4; ++i){
			if (n1 != x[i] - c[0][i])
				f = false;
			if (n2 != x[i] - c[1][i])
				f2 = false;
		}

		if (f){
			int i(0);
			for(auto x : aa){
				for (auto y : x){
					if (y == '.'){
						std::cout << y;
						continue;
					}

					int q = y - 'a';
					if (q - n1 < 0){
						q = 26 - n1;
					}
					else
						q -= n1;

					std::cout << (char)(q + 'a');
				}
				if (i < aa.size()-1)
					std::cout << " ";
				++i;
			}
			std::cout << endl;
			return 0;
		}
		else if (f2){
			int i(0);
			for (auto x : aa){
				for (auto y : x){
					if (y == '.'){
						std::cout << y;
						continue;
					}

					int q = y - 'a';
					if (q - n2 < 0){
						q = 26 - n2;
					}
					else
						q -= n2;

					std::cout << (char)(q + 'a');
				}
				if (i < aa.size() - 1)
					std::cout << " ";
				++i;
			}
			std::cout << endl;
			return 0;
		}

	}
	return 0;
}