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 <fstream>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
typedef long long int lli;
using namespace std;

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

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

bool find(string str, string can) {
  string tmp_can = ' ' + can + ' ';
  string tmp_str = ' ' + str + ' ';
  for (int i = 0; i < tmp_str.length(); ++i) {
    if (string::npos != tmp_str.find(tmp_can, i)) {
      return true;
    }
  }
  return false;
}

int main() {
  string str;
  string candies[] = {"this", "the", "that"};
  while(getline(cin, str)) {
  for (int m = 0; m < 25; ++m) {
    for (int i = 0; i < str.length(); ++i) {
      if (str[i] == ' ') {
        continue;
      }
      if (str[i] == ',' || str[i] == '.') {
        str[i] = ' ';
        continue;
      }
      int char_id = static_cast<int>(str[i]) - 97;
      int shifted = static_cast<int>(char_id + 1);
      str[i] = static_cast<char>(shifted % 26 + 97);
    }
    for (int i = 0; i < sizeof(candies) / sizeof(candies[0]); ++i) {
      if (find(str, candies[i])) {
        cout << str << endl;
        break;
      }
    }
  }
  }
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	string s,t;
	while(getline(cin,s)){t=s;
	for(int i=0;i<26;i++){
		s=t;
		for(int j=0;j<s.size();j++){
			if(s[j]>='a'&&s[j]<='z')for(int k=0;k<i;k++){
				s[j]++;
				if(s[j]>'z')s[j]-=26;
			}
		}
		if((s.find("the")!=s.npos||s.find("this")!=s.npos||s.find("that")!=s.npos))break;
	}
	cout<<s<<endl;}
}

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) % 28);
	    }
	    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]) 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()
{
    string s;
	while(getline(cin,s)){
		int n=s.size();
		for(int k=0;k<26;k++){
			for(int i=0;i<n;i++)if('a'<=s[i]&&s[i]<='z')s[i]='z'<(s[i]+1)?'a':(s[i]+1);
			if(s.find("the")!=string::npos||s.find("this")!=string::npos||s.find("that")!=string::npos)break;
		}
		cout<<s<<endl;
	}
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include<string>
#include<vector>
int main() {
	std::string s,a;

	while (std::getline(std::cin, s)) {
		int p = s[0] - 't';
		for (int i = 0; i < s.size(); ++i) {
			if (s[i] != ' ' &&s[i] != '.') {
				if (s[i] - p < 'a') {
					a += 'z' - ('a' - (s[i] - p) - 1);
				}
				else a += s[i] - p;
			}
			else a += s[i];
		}
		std::cout << a << std::endl;
	}	
	return 0;
}

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

int main(){
	string angou;
	
	while (getline(cin, angou)){
		int a = angou.size();

		for (int i = 0; i < 26; i++)
		{
			for (int q = 0; q < a; q++){
				if (angou[q] == ' ' || angou[q] == '.') continue;

				if (angou[q] == 'z') angou[q] = 'a';
				else angou[q]++;
			}

			bool theExists = angou.find("the") != string::npos;
			bool thisExists = angou.find("this") != string::npos;
			bool thatExists = angou.find("that") != string::npos;
			if (theExists || thisExists || thatExists)
			{
				cout << angou << endl;
				continue;
			}
		}
	}

	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

using namespace std;


int main(){
	string tmp;
	string key[] = {"the","this","that"};
	int alfabet;
	bool clearFlag;
	while(getline(cin,tmp)){
		clearFlag = false;
		alfabet = 26;
		while(alfabet--){

			for(string::iterator it = tmp.begin(); it != tmp.end(); it++){
				if(*it == '\n'){
					it = tmp.erase(it);
				}
				if(*it >= 'a' && *it <= 'z'){
					(*it)++;
					if(*it >= 'z'){
						*it = 'a';
					}
				}
			}
			for(int j = 0; j < 3; j++){
				if(tmp.find(key[j]) != string::npos){
					cout << tmp << endl;
					clearFlag = true;
					break;
				}
			}

			if(clearFlag == true){
				break;
			}

		}

		cout << flush;

	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

void f(string &s)
{
    for (char &c : s) {
        if ('a' <= c && c <= 'z') c = (c - 'a' + 25) % 26 + 'a';
    }
}

int main()
{
    string s;

    while (getline(cin, s)) {
        if (s == "") break;
        while (s.find("the") != string::npos && s.find("this") != string::npos && s.find("that") != string::npos) f(s);
        cout << s << endl;
    }
}

C++: #include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <memory.h>
#include <map>
#include <math.h>
#include <utility>
#include <set>

#pragma warning(disable:4996)
using namespace std;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
const double PI = 3.141592653589793238;
const Int INF = 999999999999;
typedef pair<int, int> P;


int main()
{
	string a;

	auto s = string::npos;
	while (getline(cin, a)){
		REP(i, 26){
			for (auto& x : a){
				if (x<'a' || x>'z'){
					continue;
				}
				++x;
				if (x > 'z')x = 'a';
			}
			if (a.find("this") != s || a.find("the") != s || a.find("that") != s)
				cout << a << endl;
		}
	}
	return 0;
}