Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if reflect.DeepEqual(infos, []string{}) {
			break
		}
		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
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <queue>
#include <iterator>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int gcd(int a, int b){
   int tmp;
   while(a%b==0){
      tmp=a%b;
      a=b;
      b=tmp;
   }
}

int lcm(int a,int b){
   return a*b/gcd(a,b);
}

bool prime_number(int n){
   if(n < 2){
      return false;
   }
   else if(n == 2){
      return true;
   }
   if(n % 2 == 0){
      return false;
   }
   for(int i=3;i<=n/i;i+=2){
      if(n % i == 0) return false;
      return true;
   }
}

int main(){
   vector<string> a;
   string b;
   while(cin>>b){
      REP(i,b.size()) if(b[i]!='.')b[i]-=4;
      a.PB(b);
   }
   REP(i,a.size()){
      cout << a[i];
      if(i!=a.size()-1) cout << " ";
   }
   cout << endl;
   return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;


int main(){
	string str;

	while(getline(cin,str)){
        for(int i=0;i<26;i++){
            if(str.find("the")!=string::npos)break;
            if(str.find("this")!=string::npos)break;
            if(str.find("that")!=string::npos)break;

            for(int j=0;j<str.size();j++){
                if(!isalpha(str[j]))continue;
                str[j]=(str[j]-'a'+1)%26+'a';
            }
        }
        cout<<str<<endl;
    }
    return 0;
}

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

int main()
{
    string Alphabet = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz";
    string THE[26];
    string THIS[26];
    string THAT[26];
    //Generate THE
    for(int x = 0; x < 26; x++)
    {
        THE[x] = THE[x] + Alphabet[26+x] + Alphabet[26+7-19+x] + Alphabet[26+4-19+x];
    }

    //Generate THIS
    for(int y = 0; y < 26; y++)
    {
        THIS[y] = THIS[y] + Alphabet[26+y] + Alphabet[26+7-19+y] + Alphabet[26+8-19+y] + Alphabet[26+18-19+y];
    }

    //Generate THAT
    for(int z = 0; z < 26; z++)
    {
        THAT[z] = THAT[z] + Alphabet[26+z] + Alphabet[26+7-19+z] + Alphabet[26-19+z] + Alphabet[26+z];
    }




    string Text;
    //Input
    getline(cin,Text);

    int Different = 0;

    //Find THE THIS THAT

    for(int A = 0; A < 26; A++)
    {
        if(Text.find(THE[A]) < Text.length())
        {
            break;
        }
        else if(Text.find(THIS[A]) < Text.length())
        {
            break;
        }
        else if(Text.find(THAT[A]) < Text.length())
        {
            break;
        }
        Different++;
    }


    //Convert Sentence

    for(unsigned int B = 0; B < Text.length(); B++)
    {
        for(int N = 0; N < 26; N++)
        {
            if(Text[B] == Alphabet[N])
            {
                Text[B] = Alphabet[N+Different-1];
                break;
            }

        }
    }

    cout << Text << endl;
}

C++: #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
int main(){

  //  string x;
  char x[100];



  while(gets(x)){
    //  cin >> x;


    bool is = true;
    if(strlen(x) >= 3){
      for(int i = 0; i < 30 ; i++){
	//the 
	for(int j = 0; j <= strlen(x)-3; j++){
	  if(is && x[j] =='t' && x[j+1] == 'h' && x[j+2] == 'e'){
	    is = false;
	    break;
	  }
	}
	// this or that
	if(strlen(x) >= 4){
	  for(int j = 0; j <= strlen(x)-4; j++){
	    if(is && x[j] =='t' && x[j+1] == 'h' && x[j+2] == 'a' && x[j+3] =='t' ){
	      is = false;
	      break;
	    }
	    if(is && x[j] =='t' && x[j+1] == 'h' && x[j+2] == 'i' && x[j+3] =='s' ){
	      is = false;
	      break;
	    }
	  }
	}
	// increment
	if(is == false) break; 
	for(int j = 0; j < strlen(x) ; j++){
	  if(x[j] == 'z') x[j] = 'a';
	  else if(x[j] >= 'a' && x[j] < 'z') x[j]++;
	}
      }
    
      if(is == false)	
	cout << x << endl;
    }
  }
  return 0;
}

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

string inc(string str, int c)
{
    for (int i = 0; i < str.size(); ++i) {
        if (str[i] < 'a' || 'z' < str[i])
            continue;
        int tmp = (str[i] - 'a' + c)%26;
        str[i] = 'a' + tmp;
    }
    return str;
}

int main(void)
{
    bool flag;
    string str;
    getline(cin, str);

    for (int i = 0; i < 26; ++i) {
        flag = false;
        string tmp;
        stringstream ss;
        ss << str;
        while (!ss.eof()) {
            ss >> tmp;
            tmp = inc(tmp, i);
            flag += tmp == "this";
            flag += tmp == "that";
            flag += tmp == "the";
            flag += tmp == "this.";
            flag += tmp == "that.";
            if (flag)
                break;
        }
        if (flag) {
            cout << inc(str, i) << endl;
            break;
        }
    }
    return 0;
}