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 "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
const ld eps = 1e-9;

//// < "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\a.txt" > "d:\d_download\visual studio 2015\projects\programing_contest_c++\debug\b.txt"


int main() {
	string st;
	vector<string>ths{ "the","this","that" };
	while (getline(cin, st)) {
		for (int i = 1; i < 26; ++i) {
			string nextst(st);
			for (auto&c : nextst) {
				int n = c - 'a';
				if (n < 0 || n >= 26)continue;
				n += i;
				n %= 26;
				c = 'a' + n;
			}
			bool ok = false;
			for (auto th : ths) {
				if (nextst.find(th) != -1)ok = true;
			}
			if (ok) {
				cout << nextst << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <cstdio>
#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[80];
  REP(i,80) {
    if((a[i] = getc(stdin)) == EOF) break;
  }
  


  while(1) {
    int q = 0;//1..t, 2..th, 3..the, 4...thi, 5..this, 6..tha, 7..that 
    int j = 0;
    while(a[j] != EOF) {
      if(a[j] == 'z') a[j] = 'a';
      else if(a[j] >= 'a' && a[j] < 'z') a[j]++;
      j++;
    }
    j = 0;
    while(a[j] != EOF) {
      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;
      }
      j++;
    }
    if(q == 3 || q == 5 || q == 7) break;
  }
  
  int i = 0;
  while(a[i] != EOF) {
    printf("%c",a[i]);
    i++;
  }
  return 0;
}

C++: #include<string>
#include<vector>
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<functional>
#include<map>
#include<stack>
#include<set>
#include<cmath>

#define REP(i,s,e) for(int i=int(s);i<=int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)

#define EPS 1e-6

using namespace std;

bool f(string a){

	string::size_type p=a.find("the");
	string::size_type q=a.find("this");
	string::size_type r=a.find("that");
	if(p!=string::npos || q!=string::npos || r!=string::npos)
	return true;
	else return false;

	}

int main(){

   string s,s1;

   while(getline(cin,s)){



	int n=s.size();

	REP(k,1,26){
	s1=s;
	rep(i,n){
	if('a'<=s1[i] && s1[i]<='a'-1+k) s1[i]+=26-k;
	if('a'+k<=s1[i] && s1[i]<='z') s1[i]+=-k;
	}

	if(f(s1)){ cout << s1 << endl; break; }

	}


	}


    return 0;
}

C++: // 何文字ズラすか分からない(1文字ずつズラして"the"が出るまで確認する)シーザー暗号の問題
// http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0017&lang=jp
#include <iostream>
#include <string>
using namespace std;
int main()
{
	string s;
	while (getline(cin, s))
	{
		// "the"も"this"も"that"も見つからない, 限りループし続ける
		while (s.find("the") == string::npos
			&& s.find("this") == string::npos
			&& s.find("that") == string::npos)
		{
			for (int i=0; i<s.size(); i++)
			{
				if (s[i] == 'z') // zの場合はaにリセット
					s[i] = 'a';
				else if (s[i] >= 'a' && s[i] <= 'z') // アルファベットは1文字ズラす
					s[i]++;
			}
		}
		cout << s << endl;
	}
}

C++: 
#include <iostream>
#include <string>
 
using namespace std;
 
int main()
{
    string input;
    const int alph_lim = 26;
 
    while (getline(cin, input, '\n')) {
        for (int i = 0; i < alph_lim; i++) {
            for (int j = 0; j < input.size(); j++) {
                if (islower(input[j])) {
                    input[j]++;
                    if (input[j] > 'z') 
                        input[j] -= alph_lim;
                }
            }
 
            if (input.find("the") != string::npos ||
                input.find("this") != string::npos ||
                input.find("that") != string::npos) {
                cout << input << endl;
                break;
            }
        }
    }
 
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

int pat[3][3];
int len[3];
int chr[3];
int zure;
int size;
bool atteru[3];
char text[100];

int main() {
	//cin >> text;
	gets(text);
	//int size = text.size();
	int pt = 0;
	while (text[pt] != EOF) {
		pt++;
		size++;
	}

	pat[0][0] = 't' - 'h';
	pat[0][1] = 'h' - 'e';
	pat[1][0] = 't' - 'h';
	pat[1][1] = 'h' - 'i';
	pat[1][2] = 'i' - 's';
	pat[2][0] = 't' - 'h';
	pat[2][1] = 'h' - 'a';
	pat[2][2] = 'a' - 't';
	chr[0] = 'e';
	chr[1] = 's';
	chr[2] = 't';
	len[0] = 3;
	len[1] = 4;
	len[2] = 4;

	for (int i = 0; i < 3; i++) {
		for (int j = 0; j < 3; j++) {
			if (pat[i][j] < 0) pat[i][j] += 26;
		}
	}

	zure = -1;

	int cnt = 0;
	atteru[0] = true;
	atteru[1] = true;
	atteru[2] = true;
	for (int i = 0; i < size-1 && zure == -1; i++) {
		if (text[i+1] == ' ' || cnt > 3) continue;
		if (text[i] == ' ') {
			cnt = 0;
			atteru[0] = true;
			atteru[1] = true;
			atteru[2] = true;
			cout << "yarinaoshi!" << endl;
			continue;
		}
		int dist = text[i] - text[i+1];
		if (dist < 0) dist += 26;
		for (int j = 0; j <= 2; j++) {
			if (!atteru[j]) continue;
			if (cnt >= len[j]-1) continue;
			if (dist != pat[j][cnt]) {
				atteru[j] = false;
				//cout << j << " ha tigau!" << endl;
				continue;
			} else if (cnt == len[j]-2) {
				//cout << j << " ha atteta!" << endl;
				zure = text[i+1] - chr[j];
				if (zure < 0) zure += 26;
				//cout << "zure = " << zure << endl;
			}
		}
		cnt++;
	}

	for (int i = 0; i < size; i++) {
		if (text[i] == '.') break;
		if (text[i] == ' ') continue;
		text[i] = text[i] - zure;
		if (text[i] < 'a') text[i] += 26;
	}

	cout << text << endl;

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/