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 <cstdio>
#include <cstdlib>
#include <algorithm>
#include <stack>
#include <cmath>
using namespace std;

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define llong long long

int main() {
  char *a = (char*)malloc(sizeof(char)*82);
  size_t l = 0;
  while (getline(&a, &l, stdin) != EOF) {
    while(1) {
      int q = 0;//1..t, 2..th, 3..the, 4...thi, 5..this, 6..tha, 7..that 
      REP(j , (int)l-1) {
	if(a[j] == 'z') a[j] = 'a';
	else if(a[j] >= 'a' && a[j] < 'z') a[j]++;
      }
      REP(j , (int)l-1) {
	switch(q){
	case 0:
	  if(a[j] == 't') q++;
	  break;
	case 1:
	  if(a[j] == 'h') q++;
	  else q = 0;
	  break;
	case 2:
	  if(a[j] == 'e') q = 3;
	  else if(a[j] == 'i') q = 4;
	  else if(a[j] == 'a') q = 6;
	  else q = 0;
	  break;
	case 4:
	  if(a[j] == 's') q = 5;
	  else q = 0;
	  break;
	case 6:
	  if(a[j] == 't') q = 7;
	  else q = 0;
	  break;
	}
      }
      if(q == 3 || q == 5 || q == 7) break;
    }
    
    REP(i , (int)l-1) {
      printf("%c",a[i]);
    }
  }
  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)){
		rep(i,1,26){
			string t;
			t=change(s,i);
			bool f=0;
			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 <cstdio>
using namespace std;

int main(void){
    string str;
    int flg = 0;
    
    while(1){
        getline(cin,str);
        
        for(int i = 0 ; i < str.size() ; i++){
            if('a' <= str[i] && str[i] <= 'z') cout << (char)('a'+(str[i]-'a'+26-4)%26);
            else cout << str[i];
            if(str[i] == '.') flg = 1;
        }
        if(flg) break;
    }
    puts("");
    
    return 0;
}

C++: //#define _USE_MATH_DEFINES
//#include <cmath>
#include <iostream>
//#include <stdio.h>
//#include <stdlib.h>
//#include <iomanip>
#include <vector>
#include <string>
//#include <algorithm>
//#include <functional>
//#include <time.h>
#include <sstream>

using namespace std;


int main(){

	string s,sc, buf;
	stringstream ss;
	vector <string> as;
	int dif = 0;


	while (getline(cin, s)){
		sc += s;
		for (int i = 0; i < sc.size(); i++){
			if (sc[i] == '.')sc[i] = ' ';
		}
		ss << sc;

		while (ss >> buf){
			//the this that???????´¢
			if (buf.size() == 3){
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 15){
					dif = buf[0] - 't';
					break;
				}
			}
			else if (buf.size() == 4){
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 11 && (buf[0] - buf[3]) == 1){
					dif = buf[0] - 't';
					break;
				}
				if ((buf[0] - buf[1]) == 12 && (buf[0] - buf[2]) == 19 && (buf[0] - buf[3]) == 0){
					dif = buf[0] - 't';
					break;
				}
			}
		}

		for (int i = 0; i < s.size(); i++){
			if (s[i] >= 'a' && s[i] <= 'z') s[i] -= dif;
		}

		cout << s << endl;
	}




	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  string str[80];
  vector<int> num;
  int i=0;
  while(cin>>str[i]){
    if(str[i].size()==4||str[i].size()==3)
      num.push_back((str[i].size()*100)+i);
  }
  int flag=0,zure=0;
  for(int i=0;i<num.size();i++){
    if(num[i]/100==3){
      for(int j=0;j<3;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-300][0]=='t'+k){
	    if(str[num[i]-300][1]=='h'+k&&str[num[i]-300][2]=='e'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
    else{
      for(int j=0;j<4;j++){
	for(int k=1;k<26;k++){
	  if(str[num[i]-400][0]=='t'+k&&str[num[i]-400][1]=='h'+k){
	    if(str[num[i]-400][2]=='i'+k&&str[num[i]-400][3]=='s'+k||str[num[i]-400][2]=='a'+k&&str[num[i]-400][2]=='t'+k){
	      zure=k;flag=1;break;
	    }
	  }
	}
	if(flag==1)
	  break;
      }
      if(flag==1)
	break;
    }
  }
  for(int j=0;j<10;j++){
    for(int k=0;k<str[j].size();k++){
      str[j][k]=str[j][k]+zure;
    }
  }
  for(int j=0;j<10;j++){
    cout<<str[j];
    if(j!=10)
      cout<<" ";
  }cout<<endl;
  return 0;
}

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

int main(){
	string s,d;
	while(getline(cin,s)){
		for(int j=0;j<26;j++){
			for(int i=0;i<s.size();i++){
				if(s[i]>='a'&&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 <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
#include <complex>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_PRIME = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

char rot13(char c, int n)
{
  return 'a' + (c + n) % 26;
}

string rot13(string &s, int n)
{
  n %= 26;
  string res;
  tr (s, p) {
    if (islower(*p))
      res.pb(rot13(*p, n));
    else
      res.pb(*p);
  }
  return res;
}

int main(int argc, char **argv)
{
  string enc;

  while (!getline(cin, enc).eof()) {
    for (int i = 0; i < 26; i++) {
      string s = rot13(enc, i);
      if ((int)s.find("the ") >= 0 || (int)s.find("this ") >= 0 || (int)s.find("that ") >= 0) {
        cout << s << endl;
        break;
      }
    }
  }
  return 0;
}