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 <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <stdio.h>

using namespace std;

int pat[3][3];
int len[3];
int chr[3];
int zure;
int size;
bool atteru[3];
char text[100];

int main() {
	//cin >> text;
	gets(text);
	//int size = text.size();
	int pt = 0;
	while (text[pt] != EOF) {
		pt++;
		size++;
	}

	pat[0][0] = 't' - 'h';
	pat[0][1] = 'h' - 'e';
	pat[1][0] = 't' - 'h';
	pat[1][1] = 'h' - 'i';
	pat[1][2] = 'i' - 's';
	pat[2][0] = 't' - 'h';
	pat[2][1] = 'h' - 'a';
	pat[2][2] = 'a' - 't';
	chr[0] = 'e';
	chr[1] = 's';
	chr[2] = 't';
	len[0] = 3;
	len[1] = 4;
	len[2] = 4;

	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (pat[i][j] < 0) pat[i][j] += 26;
		}
	}

	zure = -1;

	int cnt = 0;
	atteru[0] = true;
	atteru[1] = true;
	atteru[2] = true;
	for (int i = 0; i < size-1 && zure == -1; i++) {
		if (text[i+1] == ' ' || cnt > 3) continue;
		if (text[i] == ' ') {
			cnt = 0;
			atteru[0] = true;
			atteru[1] = true;
			atteru[2] = true;
			//cout << "yarinaoshi!" << endl;
			continue;
		}
		int dist = text[i] - text[i+1];
		if (dist < 0) dist += 26;
		for (int j = 0; j <= 2; j++) {
			if (!atteru[j]) continue;
			if (cnt >= len[j]-1) continue;
			if (dist != pat[j][cnt]) {
				atteru[j] = false;
				//cout << j << " ha tigau!" << endl;
				continue;
			} else if (cnt == len[j]-2) {
				//cout << j << " ha atteta!" << endl;
				zure = text[i+1] - chr[j];
				if (zure < 0) zure += 26;
				//cout << "zure = " << zure << endl;
			}
		}
		cnt++;
	}

	for (int i = 0; i < size; i++) {
		if (text[i] == '.') break;
		if (text[i] == ' ') continue;
		text[i] = text[i] - zure;
		if (text[i] < 'a') text[i] += 26;
	}

	cout << text << endl;

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include <bits/stdc++.h>
using namespace std;

int main()
{
	string s;
	getline(cin, s);
	int n = s.size();
	for (int i = 0; i < 26; i++) {
		bool flag = false;
		for (int j = 0; j + 3 <= n; j++) {
			if (s.substr(j, 3) == "the" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (j + 3 == n || s[j + 3] < 'a' || s[j + 3] > 'z')) {
				flag = true;
			}
		}
		for (int j = 0; j + 4 <= n; j++) {
			if (s.substr(j, 4) == "this" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (j + 4 == n || s[j + 4] < 'a' || s[j + 4] > 'z')) {
				flag = true;
			}
		}
		for (int j = 0; j + 4 <= n; j++) {
			if (s.substr(j, 4) == "that" && (j == 0 || s[j - 1] < 'a' || s[j - 1] > 'z') && (j + 4 == n || s[j + 4] < 'a' || s[j + 4] > 'z')) {
				flag = true;
			}
		}
		if (flag) {
			cout << s << endl;
			break;
		}
		for (int j = 0; j < n; j++) {
			if (s[j] >= 'a' && s[j] <= 'z') {
				s[j] = s[j] == 'z' ? 'a' : s[j] + 1;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main(){
  string str;
  
  
  while(1){
    getline(cin,str);
    if(cin.eof())break;
    while(1){
      if(str.find("this")!=-1|| str.find("that")!=-1|| str.find("the")!=-1){cout<< str <<endl;break;}
      for(int i=0;i<(int)str.size();i++){
	
	if(str[i]=='a')str[i]='z';
	
	else if('b'<=str[i]&&str[i]<='z')str[i]-=1;
      } 
    }
  }
}

C++: #include <iostream>
#include <string.h>
#include <cstdio>
using namespace std;
char str1[82];
char str2[82];
void trans(char *orj,char *dest)
{
    int k=0,len=strlen(orj);
    for(int x=0;x<len;x++)
    {
        if(orj[x]>='a'&&orj[x]<='z')k=orj[x]-'a';
        else if(orj[x]>='A'&&orj[x]<='Z')k=orj[x]-'A';
        k=(k+22)%26;
        if(orj[x]>='a'&&orj[x]<='z')dest[x]='a'+k;
        else if(orj[x]>='A'&&orj[x]<='Z')dest[x]='A'+k;
        else dest[x]=orj[x];
    }
}
int main()
{
    while(gets(str1))
    {
        memset(str2,'\0',sizeof(str2));
        trans(str1,str2);
        cout<<str2<<endl;
    }
    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <string>
int caesar(char s[]);
bool search(char s[]);

int main(){
	char s[256];
	int i,j=0,n=10;
	scanf("%[^\n]",&s);
	while(!search(s)){
		for(i=0;s[i]!='.';i++){
			if(s[i]!=' ') s[i]++;
			if(s[i]>122) s[i]=97;
		}
	}
	printf("%s\n",s);
	return 0;
}

bool search(char s[]){
	char *is,*e,*at;
	char *tmp;
	is="this";e="the";at="that";
	tmp = strchr(s,is[0]);
	if(tmp==NULL) return false;
	while(tmp[0]!=NULL){
		if(!strncmp(tmp,is,4))	return true;
		if(!strncmp(tmp,e,4))	return true;
		if(!strncmp(tmp,at,3))	return true;
		tmp++;
	}
	return false;
}

C++: #include<iostream>
#include<string.h>
#include<stdio.h>

int main(){
	char s[100];

	int count = 0;

	gets(s);

	int diff = s[0] - 't';

	for (int j = 0; j < strlen(s); j++){
		if (s[j] == '.' || s[j] == ' ')
			continue;
		s[j] -= diff;
	}

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

	return 0;
}

C++: #include <stdio.h>
using namespace std;
int main()
{
char ch;
while (scanf("%c",&ch)==1)

    if(ch == ' ') printf(" ");
    else if(ch == '.') printf(".");
    else if (ch == '\n') printf("\n");
    else printf("%c",ch-4);
return 0;
}

C++: #include<stdio.h>
#include<string.h>

int main(){
	char s[80],os[80];
	int i,j;
	while(1){
	if(gets(s)==NULL)return 0;
	int len=strlen(s);
	for(j=0;j<len;j++)os[j]=s[j];
	os[len]='\0';
	for(j=0;j<26;j++){
		for(i=0;i<len;i++){
			if(s[i]>='a'&&s[i]<='z'){
				s[i]-=j;
				if(s[i]<'a')s[i]+=('z'-'a');
			}
		}
		if(strstr(s,"this")!=NULL||strstr(s,"the")!=NULL||strstr(s,"that")!=NULL){
			goto end;
		}
		for(i=0;i<len;i++)s[i]=os[i];
	}
end:
	for(i=0;i<len;i++){
		if(os[i]>='a'&&os[i]<='z'){
			os[i]-=j;
			if(os[i]<'a')os[i]+=('z'-'a');
		}
	}
	printf("%s\n",os);
	}
}

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

//メイン関数
int main()
{
  char str[81];
   while(fgets(str,sizeof(str),stdin)!=NULL){
  // while(scanf("%[^/n]s",str)!=EOF){

    //strstrで探索
  if((strstr(str,"the")) || (strstr(str,"this")) || (strstr(str,"that"))){
    printf("%s",str);
    continue;
  }
  int len=strlen(str);
    for(int i=1;i<=26;i++){
      for(int j=0;j<len;j++){
	if(str[j]>='a' && str[j]<='z'){       
	  str[j]++;
	  if(str[j]=='{'){
	    str[j]='a';
	  }
	}
      }
      //strstrで探索
      if((strstr(str,"the")) || (strstr(str,"this")) || (strstr(str,"that")))break;
    }
    printf("%s",str);
  }
   return 0;
}