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++: // 何文字ズラすか分からない(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 ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

C++: #include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

int main(){
    string s;
    int i, j;
    bool check;

    while( getline(cin, s) ){
        check = true;
        while(check){
            i = 0;
            while(s[i] >= 'a' && s[i] <= 'z'){
                s[i]++;
                if(s[i] == 'z' + 1){
                    s[i] = 'a';
                }
                i++;
            }
            if(s.find("the") != s.npos || s.find("this") != s.npos || s.find("that") != s.npos){
                check = false;
            }
        }
        cout << s << endl;
    }
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL

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

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

string str;

int main(){
    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 <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++;
  }
printf("\n");
  return 0;
}