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>
#include <cstdio>
using namespace std;

int main(void){
    string str;
    int flg = 0;
    
    while(1){
        getline(cin,str);
        
        for(int i = 0 ; i < str.size() ; i++){
            if('a' <= str[i] && str[i] <= 'z') cout << (char)('a'+(str[i]-'a'+26-4)%26);
            else cout << str[i];
            if(str[i] == '.') flg = 1;
        }
        if(flg) break;
    }
    puts("");
    
    return 0;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
#include <sstream>

using namespace std;


int main(){

	string s,sc, buf;
	stringstream ss;
	vector <string> as;
	int dif = 0;


	while (getline(cin, s)){
		sc += s;
		for (int i = 0; i < sc.size(); i++){
			if (sc[i] == '.')sc[i] = ' ';
		}
		ss << sc;

		while (ss >> buf){
			//the this that???????´¢
			if (buf.size() == 3){
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 15){
					dif = buf[0] - 't';
					break;
				}
			}
			else if (buf.size() == 4){
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 11 && (buf[0] - buf[3]) == 1){
					dif = buf[0] - 't';
					break;
				}
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 19 && (buf[0] - buf[3]) == 0){
					dif = buf[0] - 't';
					break;
				}
			}
		}

		for (int i = 0; i < s.size(); i++){
			if (s[i] >= 'a' && s[i] <= 'z') s[i] -= dif;
		}

		cout << s << endl;
	}




	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[80];
  vector<int> num;
  int i=0;
  while(cin>>str[i]){
    if(str[i].size()==4||str[i].size()==3)
      num.push_back((str[i].size()*100)+i);
  }
  int flag=0,zure=0;
  for(int i=0;i<num.size();i++){
    if(num[i]/100==3){
      for(int j=0;j<3;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-300][0]=='t'+k){
	    if(str[num[i]-300][1]=='h'+k&&str[num[i]-300][2]=='e'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
    else{
      for(int j=0;j<4;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-400][0]=='t'+k&&str[num[i]-400][1]=='h'+k){
	    if(str[num[i]-400][2]=='i'+k&&str[num[i]-400][3]=='s'+k||str[num[i]-400][2]=='a'+k&&str[num[i]-400][2]=='t'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
  }
  for(int j=0;j<10;j++){
    for(int k=0;k<str[j].size();k++){
      str[j][k]=str[j][k]+zure;
    }
  }
  for(int j=0;j<10;j++){
    cout<<str[j];
    if(j!=10)
      cout<<" ";
  }cout<<endl;
  return 0;
}

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

int main(){
	string s,d;
	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;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <complex>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_PRIME = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

char rot13(char c, int n)
{
  return 'a' + (c + n) % 26;
}

string rot13(string &s, int n)
{
  n %= 26;
  string res;
  tr (s, p) {
    if (islower(*p))
      res.pb(rot13(*p, n));
    else
      res.pb(*p);
  }
  return res;
}

int main(int argc, char **argv)
{
  string enc;

  while (!getline(cin, enc).eof()) {
    for (int i = 0; i < 26; i++) {
      string s = rot13(enc, i);
      if ((int)s.find("the ") >= 0 || (int)s.find("this ") >= 0 || (int)s.find("that ") >= 0) {
        cout << s << endl;
        break;
      }
    }
  }
  return 0;
}

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

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

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

C++: #include <bits/stdc++.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b) - 1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)

#define PB push_back
#define INF INT_MAX/3
#define ALL(a) (a).begin(),(a).end()
#define CLR(a) memset(a,0,sizeof(a))

typedef long long int ll;

using namespace std;

int main(){

    string s[] = {"the","this","that"};
    string in;
    while(true){
	getline(cin,in);
	if(cin.eof()) break;
	bool f = false;
	int d = 1;
	REP(i,30){

	    f = true;
	    REP(i,in.size()){
		if(in[i] == '.' || in[i] == ' ' || in[i] == '\n') continue;
		in[i]= (char)( 'a' + ( (int)(in[i] - 'a') + d) % 26);
	    }
	    vector<bool> flgs(3,false);
	    for(int i=0;i<in.size();i++){
		if(in[i] == ' '){
		    REP(j,3){
			if(in.substr(i+1,s[j].size()) == s[j] && in[i + s[j].size() + 1] == ' ') flgs[j] = true;
		    }
		}
	    }
	    if(flgs[0] || flgs[1] || flgs[2]) break;
	}
	cout << in << endl;
    }

    return 0;
}

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

int main(void)
{
	string str;
	
	while (getline(cin, str)){
		string res;
		for (int i = 0; i < 26; i++){
			for (int j = 0; j < str.size(); j++){
				if (str[j] != ' ' && str[j] != '.') res += (str[j] -'a' + i ) % 26 + 'a';
				else res += str[j];
			}
//			cout << i + 1 << " " << res << endl;
			if (res.find("this") != -1){
				cout << res << endl;
				break;
			}
			if (res.find("the") != -1){
				cout << res << endl;
				break;
			}
			if (res.find("that") != -1){
				cout << res << endl;
				break;
			}
			res.clear();
		}
	}
	
	return 0;
}