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>

using namespace std;

int main(void){
	string str;

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

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <string>
#include <algorithm>
#include <sstream>
#include <stdlib.h>

using namespace std;

int main(void){
	
	while( true ) {
		if( cin.eof() ) break;
		string str;
		string ans;
		getline( cin, str );

		for( int i = 0; i < 26; i++ ) {
			string newstr;
			newstr = str;
			for( int j = 0; j < str.length(); j++ ) {
				if( str[j] < 'a' || str[j] > 'z' ) continue;
				else {
					newstr[j] = ( str[j] - 'a' + i ) % 26 + 'a';
				}
			}
			if( newstr.find("the") != string::npos || newstr.find("this") != string::npos || newstr.find("that") != string::npos ) {
				ans = newstr;
				break;
			}
		}
		cout << ans << endl;
	}

	
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
#define rer(i,l,n) for(int i=l;i<=n;i++)
#define all(a) a.begin(),a.end()
#define o(a) cout<<a<<endl
#define pb(a) push_back(a)
#define mk(a,b) make_pair(a,b)
#define fi first
#define se second
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;

string change(string s,int n){
	string ret(s);
	rep(i,0,ret.size()){
		if(ret[i]>='a' && ret[i]<='z'){
			if(ret[i]+n>'z') ret[i]+=n-26;
			else ret[i]+=n;
		}
	}
	return ret;
}

int main(){
	string s;
	string str[3]={"this","that","the"};
	string stu[2]={" ","."};
	while(getline(cin,s)){
		bool f=0;
		rep(i,1,26){
			string t;
			t=change(s,i);
			rep(j,0,3){
				rep(k,0,2){
					if(t.find(str[j]+stu[k])!=string::npos){
						o(t); f=1; break;
					}
				}
				if(f) break;
			}if(f) break;
		}
	}
}

C++: #include<iostream>
#include<string>
#include<string.h>
using namespace std;
bool search(string);
int main()
{
	string s;
	getline(cin, s);
	while (true){
		for (int i = 0; i < s.size(); i++){
			if (s[i] == 'a'){
				s[i] = 'z';
			}
			else if (s[i]>'a'&&s[i] <= 'z'){
				s[i]--;
			}
		}
		if (search(s)){
			cout << s << endl;
			break;
		}
	}
}
bool search(string s){
	string p[] = { { "the" }, { "this" }, { "that" } };
	for (int i = 0; i < s.size(); i++){
		if (s[i] == 't'){
			for (int j = 0; j < 3; j++){
				int count = 0;
				for (int i2 = i; i2 < i + p[j].size(); i2++,count++){
					if (p[j][count] != s[i2]){
						break;
					}
				}
				if (count == p[i].size()-1){
					return true;
				}
			}
		}
	}
	return false;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
#include <istream>
#include <sstream>
#include <iomanip>
#include <iterator>
#include <climits>
using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef vector<int> VI;
typedef vector< VI > VVI;

typedef long long LL;

typedef pair<int, int> PII;
typedef vector<PII> VPII;

#define X first
#define Y second

string nextConvert(string s) {
	transform(s.begin(), s.end(), s.begin(), [](char c)->char{
			if (islower(c)) return (c - 'a' + 1) % 26 + 'a';
			else 			return c;
		});
	return s;
}

bool check(string s) {
	vector<string> targets({"the", "this", "that"});

	for (auto &target : targets) {
		if (s.find(target) != string::npos) {
			return true;
		}
	}

	return false;
}

int main(void) {
	string s;

	while (getline(cin, s)) {
		for (int i = 0; i < 26; i++) {
			s = nextConvert(s);
			if (check(s)) {
				cout << s << endl;
				break;
			}
		}
	}

	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>

using namespace std;

void shiftchar(char& ch)
{
	if (isalpha(ch)) {
		if (ch == 'z') {
			ch = 'a';
		} else {
			ch = ch + 1;
		}
	}
}

int main()
{
	string input;
	getline(cin, input);

	string decoded = input;
	for (int i = 0; i < 26; ++i) {
		for_each(decoded.begin(), decoded.end(), shiftchar);
		if (decoded.find("the") != string::npos ||
			decoded.find("this") != string::npos ||
			decoded.find("that") != string::npos) {
			break;
		}
	}

	cout << decoded;
	return 0;
}

C++: #include <iostream>
#include <string>

using namespace std;

bool isPlain(string secret){
    bool find_the,find_that,find_this;
    
    find_the = (secret.find("the") != string::npos);
    find_that = (secret.find("that") != string::npos);
    find_this = (secret.find("this") != string::npos);

    return (find_the || find_that || find_this);
}

string decipher(string secret){
    int gap = 1;
    string plain;
    bool check;
    
    //"the", "that", "this"
    check = isPlain(secret);
    
    if(check){
        plain = secret;
    }
    else {
        while(gap<=26){
            string::iterator it = secret.begin();
            for (; it != secret.end(); it += 1){
                if('a'<=*it & *it <='z')
                    *it = (*it!='z') ? *it + 1 : 'a';
                //cout << *it;
            }
            //cout << endl;
            gap++;
            if(isPlain(secret)) break;
        }
    }
    return secret;
}


int main (int argc, char const* argv[]){
    string secret, plain;
    
    
    //暗号文の取得
    getline(cin,secret);
    while(!secret.empty()){
        
        //暗号解読
        plain = decipher(secret);
        //平文の出力
        cout << plain << endl;
        
        getline(cin,secret);
    }
    
    
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <string>

using namespace std;

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

C++: #include<iostream>
#include<string>

using namespace std;


int main(){

  string s, strc;

  while(getline(cin,s)){

    for(int j=0;j<26;j++){
      

      if(s.find("the")!=string::npos ||s.find("this")!=string::npos||s.find("that")!=string::npos ){
	cout << s << endl;
      }
      for(int i=0;i<s.size();i++){//size()ツづ債閉カツ篠堋療アツづ個陳キツつウツづーツ陛板つキ
	
	if(s[i]=='z')s[i]='a';
	else if(s[i]>='a'&&s[i]<='z')s[i]++;
      }

    }

  }
  

  return 0;
}