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<stdio.h>
#include<iostream>
#include<math.h>
#include<string>
using namespace std;
int main(){
	
	char s[100];
	while(cin.getline(s,100)){
		for(int i=0;s[i]!='\0';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'))||(s[i+1]-s[i+2]=='h'-'e')||((s[i+1]-s[i+2]=='h'-'a')&&(s[i+2]-s[i+3]=='a'-'t')))){
				for(int j=0;s[j]!='\0';j++){
					if((s[j]!=' ')&&(s[j]!='.')){
						if(s[j]+'t'-s[i]-'a'<0){
							putchar('z'-'a'+s[j]+'t'-s[i]+1);
						}else{
							putchar(s[j]+'t'-s[i]);
						}
					}else{
						putchar(s[j]);
					}
				}cout<<endl;
				break;
			}
		}
	}
}

C++: #include <stdio.h>
#include <string.h>
int len=0,i=0,j;char RideBack[50][85];
void MORPH() {
	for (j=0;j<=i;j++) {for (int left=0,right=strlen(RideBack[j]);left<right;left++)
		if (RideBack[j][left]>='a' && RideBack[j][left]<='z') {RideBack[j][left]=(RideBack[j][left]-'a'+len)%26+'a';}
	if (j) printf(" ");printf("%s",RideBack[j]);}
}
void blocks() {
	int left,right=strlen(RideBack[i]);for (left=1;left<=26;left++) {
		for (j=0;j<right;j++)
			if (RideBack[i][j]>='a' && RideBack[i][j]<='z') {RideBack[i][j]++;if (RideBack[i][j]>'z') RideBack[i][j]='a';}
		if (RideBack[i][0]=='t' && RideBack[i][1]=='h') {
			if (right==3 && RideBack[i][2]=='e') len=left;
			else if (right==4 && RideBack[i][2]=='i' && RideBack[i][3]=='s') len=left;
			else if (right==4 && RideBack[i][2]=='a' && RideBack[i][3]=='t') len=left;
		}
	}
}
int main() {char T;while (1) {scanf("%s",&RideBack[i]);if (scanf("%c",&T)==EOF) {blocks();MORPH();puts("");return 0;} else if (T=='\n') {blocks();MORPH();puts("");i=0,len=0;} else blocks(),i++;}}

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

bool IncludeKeyWords(const string& Sentence)
{
	if(Sentence.find("the")  <= 80) return true;
	if(Sentence.find("this") <= 80) return true;
	if(Sentence.find("that") <= 80) return true;
	return false;
}

string OneShift(string Sentence)
{
	for(int i = 0; i < Sentence.size(); i++){
		if(97 < Sentence[i] && Sentence[i] < 123){
			Sentence[i] --;
		}else if(Sentence[i] == 97){
			Sentence[i] = 123;
		}
	}
	return Sentence;
}

string Decrypt(string Sentence)
{
	int RoopCount = 0;
	while(IncludeKeyWords(Sentence) == false){
		assert(RoopCount < 26);
		Sentence = OneShift(Sentence);
		RoopCount++;
	}
	return Sentence;
}

int main()
{
	while(true){
		string Sentence;
		getline(cin, Sentence);
		if(cin.eof() == true) break;
		string DecryptedSentence = Decrypt(Sentence);
		cout << DecryptedSentence << endl;
	}
	return 0;
}

C++: #include <string>
#include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>

class MyTransform {
private :
   int shift ;
public :
   MyTransform( int s ) : shift( s ) { }

  char operator( )( char c ) {
      if ( isspace( c ) )
	 return ' ' ;
	 else if(ispunct(c))
              return c;
      else {
	 static std::string letters( "abcdefghijklmnopqrstuvwxyz" ) ;
	 std::string::size_type found = letters.find(tolower( c )) ;
	 int shiftedpos = ( static_cast<int>( found ) + shift ) % 26 ;
	 if ( shiftedpos < 0 ) //in case of decryption possibly
	    shiftedpos = 26 + shiftedpos ;
	 char shifted = letters[shiftedpos] ;
	 return shifted ;
      }
  }
} ;

int main( ) {
        
   std::string input ;
   while(getline( std::cin , input )) {
   int myshift = 4 ;
   myshift *= -1 ; //decrypting again
   std::transform ( input.begin( ) , input.end( ) , input.begin( ) ,
	 MyTransform( myshift ) ) ;
   std::cout << input << std::endl ;
   }
   return 0 ;
}

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

bool dec(string str, string array[]) {
  for (int i = 0; i < 3; i++) {
    if (str.find(array[i], 0) != string::npos) return false;
  }
  return true;
}

int main() {
  string array[3] = {"the", "this", "that"};
  while (1) {
    string str;
    getline(cin, str);
    while (dec(str, array)) {
      for (int i = 0; i < (int)str.size(); i++) {
	if ('a' <= str[i] && str[i] <= 'z') {
	  if (str[i] == 'z') str[i] = 'a';
	  else str[i]++;
	}
      }      
    }
    cout << str << endl;
  }
  return 0;
}

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

using namespace std;

int main(void){
	string str;

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

C++: #include<iostream>
#include<string>
int main()
{
    std::string s;
    while (std::getline(std::cin, s)) {
        while (s.find("the") == s.npos && s.find("this") == s.npos && s.find("that") == s.npos) {
            for (size_t i = 0; i < s.size(); i ++) {
                if (s[i] >= 'a' && s[i] <= 'y')
                    s[i] ++;
                else if (s[i] == 'z')
                    s[i] = 'a';
            }
        }
        std::cout << s << std::endl;
    }
    return 0;
}

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



int main(int argc, const char * argv[])
{
    string word;
    while (getline(cin, word)) {
        int cnt = 0;
        for (char tmp2 = word[0]; tmp2 < 'z'; tmp2++) {
            if (tmp2 == 't') {
                break;
            }
            cnt++;
        }
        cnt = 0;
        for (char tmp2 = word[0]; tmp2 > 'a'; tmp2--) {
            if (tmp2 == 't') {
                break;
            }
            cnt--;
        }
        for (int i = 0; i < word.size(); i++) {
            if (word[i] == '.') {
                
            }
            else if (word[i] != ' ') {
                word[i] += cnt;
            }
        }
        cout << word << endl;
    }

    
    return 0;
}

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

using namespace std;

int main(){
	string str;
	getline(cin,str);
	for(int num=0;num<26;num++){
		for(int i=0;i<str.length();i++){
			if(97<=str[i] && str[i]<=122){
				str[i]+=1;
				if(str[i]>122) str[i] -=26;
			}
		}
		string::size_type index1 = str.find("the");
		string::size_type index2 = str.find("this");
		string::size_type index3 = str.find("that");
		
		if( index1 == string::npos && index2 == string::npos &&
		    index3 == string::npos){
			continue;
		}else{
			cout << str <<endl;
			break;
		}
	}
	return 0;

}

C++: #include<iostream>
#include<vector>
using namespace std;
bool isAlpha(char ch){
  return (('A'<=ch&&ch<='Z')||('a'<=ch&&ch<='z'));
}
string change(string str){
  for(int i=0;i<(int)str.size();i++){
    if(isAlpha(str[i])){
      if(str[i]=='z'||str[i]=='Z')str[i]-=25;
      else str[i]++;
    }
  }
  return str;
}
int main(){
  int ans=-1;
  string str;
  vector <string> tab;
  while(cin>>str){
    tab.push_back(str);
    for(int i=0;i<26&&ans==-1;i++){
      str=change(str);
      if(str=="the"||str=="this"||str=="that"){
	ans=i;
      }
    }
  }
  //cout<<ans<<endl;
  for(int i=0;i<(int)tab.size();i++){
    if(i)cout<<' ';
    str=tab[i];
    for(int j=0;j<=ans;j++)str=change(str);
    cout<<str;
  }
  cout<<endl;
  return 0;
}