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++: #define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    string text;
    while (getline(cin, text))
    {
        while (text.find("the") == string::npos && text.find("this") == string::npos && text.find("that") == string::npos)
        {
            rep(i, text.size())
            {
                if (text[i] != ' ' && text[i] != '.')
                {
                    if (text[i] != 'z')
                        text[i]++;
                    else
                    {
                        text[i] = 'a';
                    }
                }
            }
        }
        OP(text)
    }
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
vector<string> split(string &s, char delimiter){
  vector<string> res;
  int prev_split_point = 0;
  for (int i = 0; i < s.length(); i++) {
    while(s[i] != delimiter && i < s.length())i++;
    string add = s.substr(prev_split_point, i - prev_split_point);
    if(!add.empty())res.push_back(add);
    prev_split_point = i + 1;
  }
  return res;
}

int main(int argc, char *argv[]){
  char c[26];
  for (int i = 0; i < 26; i++) {
    c[i] = 'a' + i;
  }
  vector<string> vs;
  string s;
  string ans[] = {"this", "that", "the"};
  vector<string> tmp;
  while(getline(cin, s)){
    vs = split(s, ' ');
    int n = vs.size();
    for (int k = 0; k < 26; k++) {
      tmp = vs;
      for (int i = 0; i < vs.size(); i++) {
        for (int j = 0; j < vs[i].length(); j++) {
          if('a' <= tmp[i][j] && tmp[i][j] <= 'z')
            tmp[i][j] = c[(vs[i][j] - 'a' + k) % 25];
        }
      }
      for (int i = 0; i < 3; i++) {
        for (int j = 0; j < tmp.size(); j++) {
          if(tmp[j] == ans[i]){k = 50, i = 10, j = 1000;}
        }
      }
    }
    for (int i = 0; i < tmp.size(); i++) {
      std::cout << tmp[i];
      if(i == tmp.size() - 1)std::cout << std::endl;
      else std::cout << " ";
    }
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
int main(){std::string s;while(std::getline(std::cin,s)){char b[81],*p,*c;c=b;strcpy(b,s.c_str());int gap=0;do{p=strtok(c," .\n");if(p!=NULL){int l=strlen(p);if(l>=3&&p[0]-p[1]=='t'-'h'){if(l==3){if(p[0]-p[2]=='t'-'e'){gap='t'-p[0];break;}}else if(l==4){if(p[0]-p[2]=='t'-'i'&&p[0]-p[3]=='t'-'s'){gap='t'-p[0];break;}else if(p[0]-p[2]=='t'-'a'&&p[0]-p[3]==0){gap='t'-p[0];break;}}}}c=NULL;}while(p!=NULL);for(std::string::iterator it=s.begin();it!=s.end();++it){if(*it!=' '&&*it!='.'&&*it!='\n'){std::cout<<static_cast<char>(*it+gap);}else{std::cout<<*it;}}}}

C++: #include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
void caesar(char *s, int n) {
  char c;
  while (c = *s) {
    if (c >= 'a' && c <= 'z') 
      *s = 'a' + (c - 'a' + n) % 26;
    s++;
  }
}
int main() {
  int n;
  char s[81];
  scanf("%[^\n]s", s);
  for (n = 0; n < 26; n++) {
    caesar(s, 1);
    if (strstr(s, "the") || strstr(s, "this") || strstr(s, "that")) {
      cout << s << endl;
      break;
    }
  }
  return 0;
}

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 ('a' <= s[i] && 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 <iostream>
#include <string>

using namespace std;

int main(){
  string s;
  while(getline(cin,s)){
    for(int i=0;i<26;i++){
      string ans;
      for(string::iterator it=s.begin();it!=s.end();it++){      
	if(*it==' '||*it=='.'){
	  ans.push_back(*it);
	  continue;
	}
	ans.push_back((char)(((int)*it-0x61+i)%26+0x61));
      }
      if(ans.find("the")!=string::npos||ans.find("this")!=string::npos||ans.find("that")!=string::npos){
	cout<<ans<<endl;
	break;
      }
    }
  }
  return 0;
}

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

int cmp(string s){
	if(s.find("is",0)!=string::npos) return 1;
	if(s.find("the",0)!=string::npos) return 1;
	if(s.find("this",0)!=string::npos) return 1;
	return 0;
}

int main() {
	string s;
	getline(cin,s);
	for(int h=0;h<26;h++){
		for(unsigned int i=0;i<s.length();i++){
				if(s[i]==0x2e||s[i]==0x20||s[i]==0x0a) continue;
				s[i]+=1;
				if((int)s[i]>0x7a) s[i]=0x61;
		}if(cmp(s)==1) break;
	} cout<<s<<endl;
	return 0;
}

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

int main() {
	char s[100] = {};
	while (fgets(s,sizeof(s),stdin)) {
		int start = 0, ofs=0,ofs2,chk=1;
		char buf;
		for (int i = 0; s[i] != '\n'; i++) {
			cout << "start=" << start << endl;
			if (s[i] == ' ' || s[i] == '.') {
				if (i - start == 3) {
					cout << "a\n";
					chk = 1;
					ofs2 = (int)'t' - (int)s[start];
					for (int j = 1; j < 3; j++) {
						buf = s[start + j] + ofs2;
						if (buf > 'z')
							buf -= 26;
						if (buf < 'a')
							buf += 26;
						if (j == 1 && buf != 'h') {
							chk = 0;
							break;
						}
						if (j == 2 && buf != 'e')
							chk = 0;
					}
					if (chk == 1) {
						ofs = ofs2;
						cout << ofs << endl;
						break;
					}
				}
				if (i - start == 4) {
					cout << "b\n";
					chk = 0;
					ofs2 = (int)'t' - (int)s[start];
					for (int j = 1; j < 3; j++) {
						buf = s[start + j] + ofs2;
						if (buf < 'z')
							buf -= 26;
						if (buf > 'a')
							buf += 26;
						if (j == 1 && buf != 'h') {
							chk = 0;
							break;
						}
						if (j == 2 && buf == 'a')
							chk = 2;
						if (j == 2 && buf == 'i')
							chk = 3;
						if (j == 2 && buf != 'i'&&buf != 'i') {
							chk = 0;
							break;
						}
						if (j == 3 && chk == 2) {
							if (buf == 't')
								chk = 1;
							else {
								chk = 0;
								break;
							}
						}
						if (j == 3 && chk == 3) {
							if (buf == 's')
								chk = 1;
							else {
								chk = 0;
								break;
							}
						}
					}
					if (chk == 1) {
						ofs = ofs2;
						cout << ofs << endl;
						break;
					}
				}
				start = i + 1;
			}
		}
		for (int i = 0; s[i] != '\n'; i++) {
			if (s[i] != ' '&& s[i]!='.') {
				s[i] += ofs;
				if (s[i] > 'z')
					s[i] -= 26;
				if (s[i] < 'a')
					s[i] += 26;
			}
		}
		cout << s;
	}
	return 0;
}