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<bits/stdc++.h>
using namespace std;

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(cin >> s)vs.push_back(s);
  vs[vs.size() - 1].substr(0, vs[vs.size() - 1].length() - 1);
  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++) {
        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<vector>
#include<algorithm>
#include<cctype>
#include<utility>
#include<string>
#include<cstdio>

#define REP(n) for(int i = 0;i < n;i++)
#define LLREP(n) for(long long int  i = 0;i < n;i++)
typedef long long int ll;
using namespace std;
#define MAX_A 1000000007

int main(){

    string s;
    int tmp = 0;
    while(getline(cin,s)){
        for(int i = 0;i < 26;i++){
            string tmp(s);
            for(int j = 0;j < s.length();j++){

                if(isalpha(s[j])){
                    tmp[j] = (s[j]-'a'+i)%26 + 'a';
                }
            }
               
            if(tmp.find("the")!=-1||tmp.find("this")!=-1||tmp.find("that")!=-1) {
                cout << tmp << endl;
                break;  
            }
        }
        
    }


    return 0;
}

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;
}