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, " "))
	}
}

Python: import string


def check_exists(word_set, rotate_dict, search):
    for word in word_set:
        rotated_word = ''.join(rotate_dict[s] for s in word)
        if rotated_word == search:
            return True
    return False


s0 = input().strip()
alphabets = string.ascii_lowercase
frequency = sorted([(s0.count(s), 101 - ord(s)) for s in alphabets], reverse=True)
ss = s0.strip('.').split()
sl3, sl4 = set(s for s in ss if len(s) == 3), set(s for s in ss if len(s) == 4)

i, rotate_dict = 0, None
for t in frequency:
    i = t[1]
    rotate_dict = {a: b for a, b in zip(alphabets, alphabets[i:] + alphabets[:i])}
    if (check_exists(sl3, rotate_dict, 'the')
            + check_exists(sl4, rotate_dict, 'this')
            + check_exists(sl4, rotate_dict, 'that')) > 1:
        break

print(''.join(rotate_dict[s] if s.isalpha() else s for s in s0))

Python: while True:
    try:
        b = input()
    except:
        break
    if 'the' in b or 'this' in b or 'that' in b:
        print(b)
    for i in range(1,26):
        c = ''
        for j in b:
            if(j == 'z'):
                c += ('a')
            elif(str.isalpha(j) == 1):
                c += (chr(ord(j) + 1))
            else:
                c += j
        if 'the' in c or 'this' in c or 'that' in c:
            print(c)
            break
        b = c

Python: a = 'abcdefghijklmnopqrstuvwxyz'

while True:
    try:
        s = input()
    except:
        break
    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:
		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 :
		break

Python: import sys

data = sys.stdin.read()
words = list('abcdefghijklmnopqrstuvwxyz')
txt = ''
for sft in range(1,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
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 math
import re

def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
for l in range(len(N)):
    S = list(N[l])
    ans = ""
    for d in range(26):
        for i in range(len(S)):
            if ord('a') <= ord(S[i]) and ord(S[i]) < ord('z'):
                S[i] = chr(ord(S[i])+1)
            elif ord(S[i]) == ord('z'):
                S[i] = 'a'
        s = "".join(S)
        s = s.replace('.','')
        test = s.split()
        for i in range(len(test)):
            if test[i] == "the" or test[i] == "that" or test[i] == "this":
                ans = "".join(S)
        if ans != "":
            break
    print(ans)

Python: import sys


def decrypt(c, i):
    """ ????????¶????????? """
    if c.isalpha():
        t = ord(c) - i
        if t < ord('a'):
            t = ord('z') - i + 1
        return chr(t)
    else:
        return c


if __name__ == '__main__':
    # ??????????????\???
    for line in sys.stdin:

        # ?????????????????????
        found = ''  # ?????????????????????
        for i in range(0, 26):
            decrypted = ''.join([decrypt(x, i) for x in line.strip()])
            # print(decrypted)
            if ' the ' in decrypted or ' this ' in decrypted or ' that ' in decrypted or \
                    decrypted.startswith('the ') or decrypted.startswith('this ') or decrypted.startswith('that '):
                found = decrypted
                break

        # ???????????????
        if found:
            print(found)

Python: l = 'abcdefghijklmnopqrstuvwxyz'

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

Python: import sys

def restore(n,text):
    text_list=list(text)
    for i,j in enumerate(text_list):
        if ord(j)!=46 and ord(j)!=32:
            nw=ord(j)-n
            if nw<97:
                nw=ord(j)-n+26
            text_list[i]=chr(nw)
    for i in text_list:
        print(i,end='')
    print('\n')

def textsa(str):
    str_list=list(str)
    n=len(str_list)
    sa=[]
    for i in range(n-1):
        sa.append((ord(str_list[i+1])-ord(str_list[i]))%26)
    sa.append((ord(str_list[0])-ord(str_list[n-1]))%26)
    return sa

for text in sys.stdin:
    str=list(map(str,text.split()))
    for i in str:
        if textsa(i)==[14,1,10,1] or textsa(i)==[14,19,19,0]:
            n=ord(list(i)[0])-ord('t')
        if textsa(i)==[14,23,15]:
            n=ord(list(i)[0])-ord('t')
    restore(n,text)

Python: def rot_n(c, n):
    if 'a' <= c and c <= 'z':
        return chr((ord(c) - ord('a') + int(n)) % 26 + ord('a'))
    
    if 'A' <= c and c <= 'Z':
        return chr((ord(c) - ord('A') + int(n)) % 26 + ord('A'))
    
    return c

def rot(s, n):
    c = (rot_n(c, n) for c in s)
    return "".join(c)

while(True):
    try:
        s = input()
        for i in range(1,28):
            d = rot(s,i)
            if "this" in d.split() or "the" in d.split() or "that" in d.split():
                print(d)
    except:
        break

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)
raw=input()

for i in range(25):
    d=dec(raw,i+1)
    if sum([1 for i in ["the","this","that"] if i in d])>0:break
print(d)