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

C++: #include<iostream>
#include<string>
using namespace std;
main(){
	string str,str2;
	int tmp,tmp2;
	while(getline(cin,str)){
		for(int i=0;i<str.size();++i){
			str2="";
			tmp='t'-str[i];
			for(int j=0;j<4;++j){
				tmp2=str[i+j];
				if(tmp2>'e')tmp2-=26;
				tmp2+=tmp;
				if(tmp2>'z')tmp2-=26;
				else if (tmp2<'a')tmp2+=26;
				str2+=tmp2;
				if(str2=="the")break;
			}
			if(str2=="this" || str2=="that" || str2=="the"){
				break;
			}
		}
		str2="";
		for(int i=0;i<str.size();++i){
			tmp2=str[i];
			if(tmp2>='a' && tmp2<='z'){
				if(tmp2>'e')tmp2-=26;
				tmp2+=tmp;
				if(tmp2>'z')tmp2-=26;
				else if (tmp2<'a')tmp2+=26;
			}
			str2+=tmp2;
		}
		cout<<str2<<endl;
	}
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb(in,tmp) in.push_back(tmp)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  string s;
  while(getline(cin,s)){
    while(s.find("this")==string::npos&&s.find("that")==string::npos&&s.find("the")==string::npos){
      rep(i,s.size()){
	if(s[i]=='z')s[i]='a';
	else if(isalpha(s[i]))s[i]++;
      }
    }
    cout<<s<<endl;


  }


}

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

using namespace std;

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