Go: package main

import (
	"bufio"
	"os"
	"strings"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func cipher(text string, direction int, int_shift int) string {
	shift, offset := rune(int_shift), rune(26)
	runes := []rune(text)
	for index, char := range runes {
		switch direction {
		case 1:
			if char >= 'a' && char <= 'z'-shift || char >= 'A' && char <= 'Z'-shift {
				char = char + shift
			} else if char > 'z'-shift && char <= 'z' || char > 'Z'-shift && char <= 'Z' {
				char = char + shift - offset
			}
		case -1:
			if char >= 'a'+shift && char <= 'z' || char >= 'A'+shift && char <= 'Z' {
				char = char - shift
			} else if char >= 'a' && char < 'a'+shift || char >= 'A' && char < 'A'+shift {
				char = char - shift + offset
			}
		}
		runes[index] = char
	}
	return string(runes)
}

func main() {
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// fmt.Println(infos)
		Decryption:
			for i := 0; i < 26; i++ {
				for j := range infos {
					plain[j] = cipher(infos[j], 1, i)
				}
				for j := range plain {
					if plain[j] == "this" || plain[j] == "that" || plain[j] == "the" {
						break Decryption
					}
				}
			}
			fmt.Println(strings.Join(plain, " "))
	}
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back


bool is(string s){
    int len=s.size();
    cout<<s<<endl;
    rep(i,len-3){
        if( s[i]=='t' && s[i+1]=='h' && s[i+2]=='i' && s[i+3]=='s' && ( (i==0 || s[i-1]==' ') && (i+4==len || s[i+4]==' ') ) ){
            return true;
        }
        if( s[i]=='t' && s[i+1]=='h' && s[i+2]=='a' && s[i+3]=='t' && ( (i==0 || s[i-1]==' ') && (i+4==len || s[i+4]==' ') ) ){
            return true;
        }
        if( s[i]=='t' && s[i+1]=='h' && s[i+2]=='e' && ( (i==0 || s[i-1]==' ') && (i+3==len || s[i+3]==' ') ) ){
            return true;
        }
    }
    
    return false;
}

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

    while(1){
        if(is(s))break;
        rep(i,s.size()){
            if(s[i]<='z' && s[i]>='a'){
                if(s[i]=='a')s[i]='z';
                else{
                    s[i]--;
                }
            }
        }
    }
    cout<<s<<endl;
    
    
    return 0;
}

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

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

C++: #include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
#include<string>
#define pi 3.14159
using namespace std;

int main() {
	string str;
	int i;
	while(getline(cin, str)) {
		for(i = 0; i < 26; i++) {
			for(int j = 0; j < str.size(); j++) {
				if(str[j] != ' ' && str[j] != '.') {
					if(str[j] != 'a') {
						str[j] -= 1;
					} else str[j] = 'z';
					cout << str <<endl;
				}
			}
			for(int j = 0; j < str.size() - 4; j++) {
				if(str[j] == 't' && str[j + 1] == 'h') {
					if(str[j + 2] == 'e' || str[j + 2] == 'i' || str[j + 2] == 'a') {
						cout << str <<endl;
						i = 26;
						break;
					}
				}
			}
			
		}
	}

	return 0;
}

C++: #include <bits/stdc++.h>
 
using namespace std;
 
#define FOR(i, j, k) for(int i = j; i < k; ++i)
#define rep(i, j) FOR(i, 0, j)
#define repr(i, j) for(int i = j; i >= 0; --i)
#define INF (1 << 30)
#define MOD 1e9 + 7
 
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
 
int main() {
    string s;
    while(getline(cin, s)){
    	rep(i, 26) {
	    	rep(j, s.size()) {
	            if('a' <= s[i] && s[i] <= 'z') s[j] = s[j] + 'a';
	            else s[j] = 'a';
	        }
	        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 <iostream>
#include <cstring>

using namespace std;

char data[26]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
char trans[100];
char mozi;
int position=0;
int zoom;
int first_check=0,first_position=0;
int now;
char result;
int flag = 0;

int main(){
	while(flag == 0){
		scanf("%c",&mozi);
		if(first_check == 0)

		for(int i=0;i<26 && first_check == 0;i++){
			if(mozi == data[i]){
				first_position = i;
				zoom = first_position - 19;
				first_check = 1;
				break;
			}
		}




		if(mozi == ' ' || mozi == '.' || mozi == '\n'){
			if(mozi == ' ' || mozi == '.'){
				trans[position] = mozi;
				position++;
			}

			if(mozi == '\n'){
				//trans[position] = '\n';
				printf("%s\n",trans);
				first_check = 0;
				position = 0;
				memset(trans,'\0',sizeof(trans));
				flag = 1;
			}
		}else{
			for(int i=0;i<26;i++){
				if(data[i] == mozi){
					now = i;
					break;
				}
			}

			trans[position] = data[now - zoom];
			position++;

		}
	}
}

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

char str[128] = { 0 };

inline char nxt(char c) {
	if (c == 'z') {
		c = 'a';
	}
	else if (c >= 'a' && c < 'z') {
		c++;
	}
	return c;
}

bool find() {
	int p = 0;
	while (str[p] != '\0') {
		if (str[p] == 't' && str[p + 1] == 'h') {
			if (str[p + 2] == 'e') {
				return true;
			}
			else if (str[p + 2] == 'i' && str[p + 3] == 's') {
				return true;
			}
			else if (str[p + 2] == 'a' && str[p + 3] == 't') {
				return true;
			}
		}
		p++;
	}
	return false;
}

int main(){
	while (fgets(str, sizeof(str), stdin) != NULL) {
		str[strlen(str) - 1] = '\0';
		for (int i = 0; i < 25; i++) {
			int p = 0;
			while (str[p] != '\0') {
				str[p] = nxt(str[p]);
				p++;
			}
			if (find()) {
				printf("%s", str);
				break;
			}
		}
	}


	return 0;
}

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

int size;
string str;
void change()
{
  for (int i = 0; i < size; i++){
    if ('a' <= str[i] && str[i] <= 'y'){
      str[i]++;
    }
    else if (str[i] == 'z'){
      str[i] = 'a';
    }
  }
}

int main()
{
 // string str;

  while (getline(cin, str), str != ""){
    size = str.size();

    for (;;){
      if (str.find("the") != -1 || str.find("this") != -1 || str.find("that") != -1){
        cout << str << endl;
        break;
      }
      change();
    }
    str = "";
  }
  return 0;
}