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<iostream>
using namespace std;
int main()
{
	char key[100] = "";
	
	cin.getline(key, sizeof(key));

		for (int i = 0; i < sizeof(key); i++)
		{
			//if (key[i] == (int)" ")cout << "space";
			if ((int)key[i] == 0)break;
			if ((int)key[i] <= 122 && (int)key[i] >= 97)
				key[i] = (int)key[i] - 1;
			if (key[i] == 96)key[i] = 122;
		}
		for (int i = 0; i < sizeof(key); i++)
		{
			if ((int)key[i] == 0)break;
			cout << key[i];
		}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
using namespace std;
bool is_ok(const string& s)
{
  return s.find("this")!=-1 || s.find("that")!=-1 || s.find("the")!=-1;
}
int main(void)
{
  string str;
  while( getline(cin,str) ) {
    while( !is_ok(str) ) {
      for(int i=0;i<int(str.size());i++){
	if( !isalpha(str[i]) ) continue;
	str[i]++;
	if(str[i]>'z') str[i]='a';
      }
    }
    cout << str << endl;
  }
}

C++: #include <cmath>
#include <iostream>
#include <string>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <sstream>

using namespace std;

string decode(string inp,int n){
    for(int i=0;i<inp.length();i++){
        if('a'<=inp[i]&&inp[i]<='z'){
            
            inp[i]=inp[i]-n;
            if(inp[i]<'a') inp[i]+=('z'-'b');
        }
    }
    return inp;
}
bool check(string inp){
    string word;
    stringstream ss(inp);
    while(getline(ss,word,' ')){
        if(word=="the"||word=="this"||word=="that"||word=="the."||word=="this."||word=="that.")
            return true;
    }
    return false;
}
int main(){
    string input,decoded;
        for(int i=0;i<26;i++){
            decoded=decode(input,i);
            if(check(decoded)){
                break;
            }
        }
        cout << decoded << endl;
    
    return 0;
}

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

int CheckDiff(string);
int ShowSourceString(string,int);
int main(){
	string str;
	while(getline(cin,str)){
		ShowSourceString(str,CheckDiff(str));
	}
	
	return 0;
}

int CheckDiff(string str){
	for( int i=0;i<(int)str.length();i++ ){
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('a'-'t'))&&
		    (str[i+3]-str[i]==('t'-'t'))
		){
			return str[i]-'t';
		}
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('i'-'t'))&&
		    (str[i+3]-str[i]==('s'-'t'))
		){
			return str[i]-'t';
		}
		if( (str[i+1]-str[i]==('h'-'t'))&& 
		    (str[i+2]-str[i]==('e'-'t'))
		){
			return str[i]-'t';
		}
	}
	throw "Bad request";
}
int ShowSourceString(string str,int diff){
	for( int i=0;i<(int)str.length();i++ ){
		if('a'<=str[i]&&str[i]<='z' ){
			if(str[i]-diff>'z'){
				cout<<(char)('a'+str[i]-diff-'z');			
			}else if(str[i]-diff<'a'){
				cout<<(char)('z'-('a'-(str[i]-diff)));			
			}else{
				cout<<(char)(str[i]-diff);
			}
		}else{
			cout<<(char)str[i];
		}
	}
	cout<<endl;
	return 0;
}

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

typedef pair<string, string> P;

P next_word(string sentence) {
  if (sentence.empty()) return make_pair(string(""), string(""));
  if (sentence[0] == ' ' || sentence[0] == '.') {
    return make_pair("", sentence.substr(1));
  } else {
    P recur = next_word(sentence.substr(1));
    return make_pair(sentence[0] + recur.first, recur.second);
  }
}

bool acceptable(string sentence) {
  P p = next_word(sentence);

  while (! p.first.empty() ) {
    if (p.first == "this" || p.first == "the" || p.first == "that")
      return true;

    p = next_word(p.second);
  }
  return false;
}

char slip(char c) {
  if (c < 'a' || 'z' < c) return c;
  
  string alphabet = "abcdefghijklmnopqrstuvwxyza";
  int index = (int)(c - 'a');
  return alphabet[index + 1];
}

char slip(char c, int n) {
  for (int i = 0; i < n; i++)
    c = slip(c);

  return c;
}

string slip(string code, int n) {
  string val;
  for (int i = 0, len = code.length(); i < len; i++)
    val += slip(code[i], n);

  return val;
}

string decode(string code) {
  for (int i = 1; i < 27; i++) {
    string sentence = slip(code, i);
    if (acceptable(sentence))
      return sentence;
  }

  return "";
}

int main() {
  string code;
  getline(cin, code);
  cout << decode(code) << endl;

}

C++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	string str;		// ????????????????????????????´???????
	string trans;	// ????????????????????????????´???????
	
	while (std::getline(cin, str))
	{
		trans.clear();
		trans.resize(80);
		// n?????????????????????????????§7????????????
		for (int i = -7; i < 7; i++)
		{
			for (size_t j = 0; j < str.size(); j++)
			{
				// ???????????????????????????????????????
				if (str[j] == ' ' || str[j] == '.')
				{
					trans[j] = str[j];
				}
				else
				{
					trans[j] = str[j] + i;
				}
			}
			// ?????????????????????find??¢??°???????????¨??????
			// ???????????£??????????¨??????????????????£????????????????????????
			if (!trans.find("this") || !trans.find("the") || !trans.find("that"))
			{
				cout << trans << endl;
				break;
			}
		}

	}
	return 0;
}

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

int main() {
	string st;
	string w[3]={"the","this","that"};
	int wn[3]={3,4,4},k=0,i,j,s,f;
	getline(cin,st);
	while(true) {
		for (i=0;i<3;i++) {
			s=0; f=0;
			if (st.size()<k+wn[i]) break;
			for (j=0;j<wn[i]-1;j++) if ((w[i][j]-w[i][j+1])==(st[k+j]-st[k+j+1])) s++;
			if (s==wn[i]-1 && st[k+wn[i]]==' ') { f=1; i=5; }
		}
		if (f==1) break;
		for(k;st[k]!=' ' && st[k]!='.' ;k++);
		if (st[k]=='.') break;
		k++;
		}
	if (f==0) cout << st; else {
	for (i=0;i<st.size();i++) if ((st[i]>='a' && st[i]<='z')) cout << (char)(st[i]-(st[k]-'t')) ; else cout << st[i];
	}	
	cout << endl;
    return 0;
	}

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

using namespace std;
static const int MAXV = 81;

bool hantei(char data[]);
void irekae(char data[]);

int main() {
  while(!feof(stdin)) {
    char data[MAXV];
    if(fgets(data, sizeof(data), stdin)==NULL) break;
    while(!hantei(data))
      irekae(data);
    printf("%s", data);
  }
}

bool hantei(char data[]) {
  if(strstr(data, "the")) return 1;
  if(strstr(data, "this")) return 1;
  if(strstr(data, "that")) return 1;
  return 0;
}

void irekae(char data[]) {
  for(int i=0;data[i]!=0;i++) {
    if(data[i]>='a' && data[i]<='z') {
      if(data[i]=='z')data[i]='a';
      else data[i]++;
    }
  }
}