Go: package main

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

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 len(infos) == 0 {
			break
		}
		// 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, " "))
	}
}

Python: import sys


def _rot(c, i):
    if ord("a") < ord(c) and ord(c) < ord("z"):
        return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
    if ord("A") < ord(c) and ord(c) < ord("Z"):
        return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
    return c


def rot(str, i):
    g = [_rot(c, i) for c in str]
    return "".join(g)


def caesar(str):
    for i in range(26):
        s=".".join(rot(str, i).split()).split(".")
        if "the" in s or "that" in s or "this" in s:
            return rot(str,i)
    return 'none'

for line in sys.stdin:
    print(caesar(line.rstrip()))

while True:
    try:
        line = input()
        if line == '*':
            break
    except:
        break
    print(caesar(line))

Python: a='abcdefghijklmnopqrstuvwxy'
b=input()
for i in range(26):
 c=''.join(a[ord(e)-97-i]if e in a else e for e in b)
 if any(('the 'in c,'this 'in c,'that 'in c)):print(c);break

Python: while(1):
    try:
        slist = list(map(str, input().split()))
    except:
        break

    rot = 0
    for i in range(26):
        for s in slist:
            ch = ""
            for c in s:
                if "a" <= c <= "z":
                    g = chr((ord(c) - ord("a") + i) % 26 + ord("a"))
                else:
                    g = c
                ch += g
            if ch == "this" or ch == "that" or ch == "the":
                rot = i
                break
        if rot != 0:
            break

    for i, s in enumerate(slist):
        ch = ""
        for c in s:
            if "a" <= c <= "z":
                g = chr((ord(c) - ord("a") + rot) % 26 + ord("a"))
            else:
                g = c
            ch += g
        if i == len(slist) - 1:
            print(ch)
        else:
            print(ch + " ", end="")

Python: import sys

data = sys.stdin.read()
words = list('abcdefghijklmnopqrstuvwxyz')
txt = ''
for sft in range(0,len(words)):
    txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in data])
    if 'the' in txt.split(' ') or 'this' in txt.split(' ') or 'that' in txt.split(' '):
        break
print(txt, end='')

Python: import sys

s = "abcdefghijklmnopqrstuvwxyz"

for line in sys.stdin:
  while True:
    if ("the" in line) or ("this" in line) or ("that" in line):
      break
    else:
      l = [i for i in line]
      for i in range(len(l)):
        if l[i] in s:
          a = s.index(l[i])
          l[i] = l[i].replace(l[i],s[(a+1)%26])
      line = "".join(l)
  print(line)

Python: while True:
    try:
        s = input()
    except:
        break

    alphabet = 'abcdefghijklmnopqrstuvwxyz'

    for i in range(26):
        decoded_s = ''
        for j in range(len(s)):
            if s[j] not in alphabet:
                decoded_s += s[j]
                continue

            decoded_s += alphabet[alphabet.index(s[j]) - i]

        if 'the' in decoded_s or 'this' in decoded_s or 'that' in decoded_s:
            break

    print(decoded_s)

Python: 
import string
def CaesarCipher():
    
    low=string.ascii_lowercase
    
    for cry in sys.stdin: 
        for i in range(1,27):
            
            dec=cry.translate(str.maketrans(low,low[i:]+low[:i]))
    
            if 'this' in dec or 'that' in dec or 'the' in dec:
                print(dec)
            
                
    
CaesarCipher()

Python: # -*- coding: utf-8 -*-

import sys
import os
from math import sin, cos
import math

alphabet = 'abcdefghijklmnopqrstuvwxyz'


def rotate_char(c, num):
    if c == ' ' or c == '.' or c == '\n':
        return c

    n = ord(c) + num
    if n > 122:
        n -= 26
    return chr(n)

def rotate_string(s, num):
    ret = []
    for c in s:
        new_c = rotate_char(c, num)
        ret.append(new_c)
    return ''.join(ret)

s = input().strip()
for i in range(1, 26):
    rotated = rotate_string(s, i)
    if 'the' in rotated or 'this' in rotated or 'that' in rotated:
        print(rotated, end='')
        break

Python: while 1:
    try:
        n=float('inf')
        s=raw_input().strip('.').split()
        for i in xrange(26):
            for j in s:
                r1=[]
                r2=[]
                for k in j:
                    r1.append(chr(ord(k)+i))
                    r2.append(chr(ord(k)-i))
                if "".join(r1)=="this" or "".join(r1)=="that" or "".join(r1)=="the":
                    n=i
                if "".join(r2)=="this" or "".join(r2)=="that" or "".join(r2)=="the":
                    n=-i
            if n!=float('inf'):
                break
        ans=[]
        for i in s:
            splitans=[]
            for j in i:
                splitans.append(chr(ord(j)+n))
            ans.append(''.join(splitans))
        print(' '.join(ans)+'.')
    except:
        break

Python: s = input()
a = "".join([chr(97 + i) for i in range(26)])
b = "".join([a[i - 1] for i in range(26)])
x = str.maketrans(a, b)
while True:
    s = s.translate(x)
    if "the" in s or "that" in s or "this" in s:
        print(s)
        break

Python: import string
a=string.ascii_lowercase
while True:
    try:
        s=input()
    except:
        break
    for i in range(1, 27):
        t = s[:-1].translate(str.maketrans(a, a[i:]+a[:i]))
        if 'the'in t or'that'in t or'this'in t:
            print(t+".")
            break

Python: import fileinput
import string

alphabetArray = list(string.ascii_lowercase)


for data in fileinput.input():
    for n in range(-25, 26):
        replacedStr = data.replace('\n', '').replace('\r', '')
        for i in range(0, 26):
            if n > 0:
                replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[(i + n) % 26])
            else:
                replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[i + n])
        if "this" in replacedStr or "the" in replacedStr or "that" in replacedStr:
            print(replacedStr)
            break

Python: import sys
for b in sys.stdin:
 for i in range(26):
  c=''.join([e,chr((ord(e)-96+i)%26+97)][96<ord(e)<123]for e in b)
  if any(('the'in c,'this'in c,'that'in c)):print(c.strip())

Python: import sys

a = 'abcdefghijklmnopqrstuvwxyz'
for i in sys.stdin.readlines():
    s = i.strip()
    for j in range(1, 26):
        t = s.translate(str.maketrans(a, a[j:] + a[:j]))
        if 'the' in t or 'this' in t or 'that' in t:
            print(t)