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>
#include <string>
#define ALF 26
using namespace std;

int main(){
	string h[3] = {"the","that","this"};
	string s;
	getline(cin,s);
	int c = 0;
	for(int j=0;j<ALF;j++){
		for(int m=0;m<3;m++){
			for(int k=0;k<=s.size()-h[m].size();k++){
				string t = s.substr(k,h[m].size());
				for(int l=0;l<h[m].size();l++) t[l] = (t[l]-'a'+j)%ALF + 'a';
				if(t==h[m]) c = j;
				cout << c << " " << t << " " << h[m] << endl;
			}
		}
	}
	for(int j=0;j<s.size();j++){
		if('a'<=s[j] and s[j]<='z') s[j] = (s[j]-'a'+c)%ALF + 'a';
	}
	cout << s << endl;
}

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

int main(){
  string s;
  int cnt=0;

  while(getline(cin, s)){


    while(true){
      bool flag=false;
      
      for(int i=0;i<s.length();i++){
	string key1 = s.substr(i,3);
	string key2 = s.substr(i,4);
	if(key1 == "the" || key2 == "this" || key2 == "that"){
	  flag = true;
	  break;
	}
      }
      
      if(flag){
	cout << s << endl;
	break;
      }
    
      for(int i=0;i<s.length();i++){
	if(s[i] > 'a' && s[i] < 'z'){
	  s[i] -= 'a';
	  s[i] -= 1;
	  if(s[i] < 0){
	    s[i] += 'A' - 'a';
	  }
	  s[i] += 'a';
	}
      }
    }
  }
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
char a[53]="abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
int main(){
    char str[82];
    for(int i=0;i<82;i++)str[i]=0;
    for(int i=0;i<80;i++){
        str[i]=getchar();
        if(str[i]==10)break;
    }
    int len=strlen(str);

    for(int i=0;i<=26;i++){
        char cpy[82];
        strncpy(cpy,str,82);

        for(int j=0;j<len;j++){
            if(str[j]==' ' || str[j]=='.' || str[j]==10)continue;
            cpy[j]=a[cpy[j]-'a'+i];
        }
        bool f=false;
        for(int j=0;j<len-3;j++){
            if(!strncmp(cpy+j,"the",3))f=true;
            if(!strncmp(cpy+j,"this",4))f=true;
            if(!strncmp(cpy+j,"that",4))f=true;
        }
        if(f){
            cout<<cpy<<endl;
            break;
        }
    }
    return 0;


}

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <cmath>
#define INF 1000000000

using namespace std;

// the this that

vector<string> split(string str, string delim) {
  vector<string> res;
  int cutAt;
  while ((cutAt = str.find_first_of(delim))!=str.npos) {
    if (cutAt > 0) {
      res.push_back(str.substr(0,cutAt));
    }
    str = str.substr(cutAt+1);
    if (str.length() > 0) {
      res.push_back(str);
    }
  }
  return res;
}

int main() {
  string str;
  while (getline(cin, str)) {
    vector<string> strs=split(str," ");
    int key=0;
    if (strs.size()!=0) {
      for (int i=0; i<strs.size(); i++) {
	while (strs[i].find(".")!=string::npos) {
	  strs[i].erase(strs[i].find("."));
	}
	if (strs[i].length()==3&&strs[i][0]-'t'==strs[i][1]-'h'&&strs[i][1]-'h'==strs[i][2]-'e') {
	  key = strs[i][0]-'t';
	  break;
	} else if (strs[i].length()==4) {
	  if (strs[i][0]-'t'==strs[i][1]-'h'&&strs[i][1]-'h'==strs[i][2]-'a'&&strs[i][2]-'a'==strs[i][3]-'t') {
	    key = strs[i][0]-'t';
	    break;
	  }
	  if (strs[i][0]-'t'==strs[i][1]-'h'&&strs[i][1]-'h'==strs[i][2]-'i'&&strs[i][2]-'i'==strs[i][3]-'s') {
	    key = strs[i][0]-'t';
	    break;
	  }
	}
      }
    } else {
      string tmp=str;
      while (tmp.find(".")!=string::npos) {
	  tmp.erase(tmp.find("."));
      }
      if (tmp.length()==3&&tmp[0]-'t'==tmp[1]-'h'&&tmp[1]-'h'==tmp[2]-'e') {
	key = tmp[0]-'t';
      } else if (tmp.length()==4) {
	if (tmp[0]-'t'==tmp[1]-'h'&&tmp[1]-'h'==tmp[2]-'a'&&tmp[2]-'a'==tmp[3]-'t') {
	  key = tmp[0]-'t';
	}
	if (tmp[0]-'t'==tmp[1]-'h'&&tmp[1]-'h'==tmp[2]-'i'&&tmp[2]-'i'==tmp[3]-'s') {
	  key = tmp[0]-'t';
	}
      }
    }
    for (int i=0; i<str.length(); i++) {
      if (isalpha(str[i])) {
	str[i]-=key;
      }
    }
    cout<<str<<endl;
  }
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
	string str;
	getline(cin, str);
	for (int i = 0; i < str.size(); i++) {
		if (str[i] >= 'E' && str[i] <= 'Z') {
			str[i] += 'A' - 'E';
		}
		else if (str[i] >= 'e' && str[i] <= 'z') {
			str[i] += 'a' - 'e';
		}
		else if (str[i] >= 'A' && str[i] < 'E') {
			str[i] -= 'A' - 'W';
		}
		else if (str[i] >= 'a'&&str[i] < 'e') {
			str[i] -= 'a';
			str[i] += 'w';
		}
		cout << str[i];
	}
	cout << endl;

	return 0;
}

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

char convNext(char ch) {
	if('a' <= ch && ch <= 'y') return ch+1;
	if(ch=='z')return 'a';
	return ch;
}
int main() {
	char str[90];
	while(true) {
		if(!fgets(str, 90, stdin))break;
		for(int i = 0; i < 26; i++) {
			if(strstr(str,"this") || strstr(str,"that") || strstr(str,"the"))break;
			for(int j = 0; str[j]; j++) {
				str[j]=convNext(str[j]);
			}
		}
		fputs(str, stdout);
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main() {
  string s;
  while(getline(cin, s)) {
    for (int i=0; i<26; i++) {
      string s2(s);
      for (int j=0; j<s.length(); j++) {
        if (isalpha(s[j]))
          s2[j] = (s[j]-'a'+i) % 26 + 'a';
      }
      if (s2.find("the")!=-1||s2.find("this")!=-1||s2.find("that")!=-1) {
        cout << s2 << endl;break;
      }
    }
  }
}

C++: #include <string>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <map>
#define INF 100000000

using namespace std;
typedef long long ll;

string change(string s){
    int len=s.size();
    for(int i=0;i<len;i++){
        if('b'<=s[i] && s[i]<='z')s[i]--;
        if(s[i]=='a')s[i]='z';
    }
    return s;
}

bool check(string s){
    int len=s.size();
    string tan="";
    for(int i=0;i<len;i++){
        if('a'<=s[i] && s[i]<='z'){
            tan+=s[i];
        }
        else{
            if(tan=="the" || tan=="this" || tan=="that" )return true;
            tan="";
        }
    }
    return false;
}


int main(){
    string s;
    getline(cin,s);
    while(1){
        s=change(s);
        if(check(s)){cout<<s<<endl;return 0;}
    }
    
    return 0;
}