Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

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