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
}

Python: a = 'abcdefghijklmnopqrstuvwxyz'
s = input()
for n in range(1, 27):
    t = s.translate(str.maketrans(a, a[n:] + a[:n]))
    if 'the' in t or 'this' in t or 'that' in t: break
print(t)

Python: while True:
    try:
        s = input()[:-1].split()
    except:
        exit()
        
    D = 0
    for word in s:
        if len(word) == 3:
            diff = []
            for c, d in zip(word, 'the'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 3:
                D = diff[0]
                break
        if len(word) == 4:
            diff = []
            for c, d in zip(word, 'that'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 4:
                D = diff[0]
                break
            diff = list([])
            for c, d in zip(word, 'this'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 4:
                D = diff[0]
                break


    print(D)
    li = []
    for word in s:
        t = ""
        for c in word:
            t += chr( (ord(c) - ord('a') + 26 - D) % 26 + ord('a') )
        li.append(t)
    print(" ".join(li) + '.')

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):
    test=[]
    for i in range(26):
        test = rot(str, i).split()
        if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
            return " ".join(test)


a = []
for line in sys.stdin:
    a.append(line)
for i in range(len(a)):
    print(caesar(a[i]))

Python: def func(s):
    while True:
        for i in range(26):
            li = []
            for word in s:
                t = ""
                for c in word:
                    t += chr( (ord(c) - ord('a') + i) % 26 + ord('a') )
                    print(t)
                li.append(t)
            if 'this' in li or 'that' in li or 'the' in li:
                print(" ".join(li) + '.')
                return


while True:
    try:
        s = input()
    except:
        exit()

    s = s[:-1].split()
    func(s)

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 string
import sys

alpha = string.ascii_lowercase

for line in sys.stdin:
    for i in range(len(alpha)):
        cipher_str = ""
        for s in line:
            if s in alpha:
                cipher_str += alpha[(alpha.index(s)+i) % len(alpha)]
            else:
                cipher_str += s

        if ("the" or "this" or "that") in cipher_str:
            print(cipher_str)
            break
    else:
        print(line)

Python: # Aizu Problem 0017: Caesar Cipher
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

def caesar_decrypt(N, cipher):
    text = ""
    for char in cipher:
        if 'a' <= char <= 'z':
            k = (ord(char) - 97 - N) % 26
            text += chr(97 + k)
        else:
            text += char
    return text

cipher = input().strip()
for k in range(26):
    decrypted = caesar_decrypt(k, cipher)
    if "this" in decrypted and "the" in decrypted and "that" in decrypted:
        print(decrypted)
        break

Python: while(1):
	try:
		x = [i for i in input()]
		
		n=[ i for i in range(len(x))]
		p=ord('z')-ord(x[0])
		m=ord(x[0])-ord('a')
		flag=0
			
		for i in range(p+1):
			for j in range(len(x)):
				if x[j]==' ' or x[j]=='.' or x[j]=='\n':
					n[j]=x[j]
				else:
					n[j]=chr(ord(x[j])+i)
			moji=''
			for mk in n:
				moji += mk
			if moji.find('that')!=-1 or moji.find('this')!=-1 or moji.find('the')!=-1 :
				flag=1
				print(moji,end="")
		if flag==0:
			for i in range(1,m+1):
				for j in range(len(x)):
					if x[j]==' ' or x[j]=='.':
						n[j]=x[j]
					else:
						n[j]=chr(ord(x[j])-i)
				moji=''
				for mk in n:
					moji += mk
				if moji.find('that')!=-1 or moji.find('this')!=-1 or moji.find('the')!=-1 :
					print(moji,end="")
		print("")
	except EOFError:
		break

Python: import sys
a = "abcdefghijklmnopqrstuvwxyz"
x = str.maketrans(a, a[1:] + a[:1])
for s in sys.stdin:
    while True:
        s = s.translate(x)
        if "the" in s or "that" in s or "this " in s:
            print(s, end = "")
            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 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());break

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.rstrip())

Python: import sys
a='abcdefghijklmnopqrstuvwxy'
for b in sys.stdin:
 b=b.strip()
 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)

Python: import sys

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

Python: def dec(text,d):
    r=[]
    for i in text:
        c=ord(i)
        if c<65:r.append(i)
        elif c<91:r.append(chr((c-65+d)%26+65))
        else:r.append(chr((c-97+d)%26+97))
    return "".join(r)

while True:
    try:raw=input()
    except:break
    if raw=="":break
    for i in range(26):
        d=dec(raw,i)
        if sum([1 for i in ["the","this","that"] if i in d])>0:break
    print(d)

Python: A = 'abcdefghijklmnopqrstuvwxyz'
 
while True:
    try: s = input()
    except: exit()
 
    for x in range(1, 27):
        ans = s[:-1].translate(str.maketrans(A, A[x:] + A[:x]))
        if 'the' in ans or 'this' in ans or 'that' in ans:
            print(ans + '.')
            break