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
import math as mas

li='abcdefghijklmnopqrstuvwxyz'
for t in sys.stdin:
	for i in range(30):
		a=t[:-1].translate(str.maketrans(li,li[i:]+li[:i]))
		if 1+a.find("this") or 1+a.find("that") or 1+a.find("the"):
			print(a)
			break
#for i in sys.stdin:
#	a,b=map(int,i.split())
#	print(gcd(a,b),lcm(a,b))

Python: import string
import sys


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


for line in sys.stdin:
    s0 = line.strip()
    alphabets = string.ascii_lowercase
    frequency = [t[1] for t in sorted([(s0.count(s), ord(s)) for s in alphabets], reverse=True)]
    freq_chr_offset = (4, 0, 19, 8, 14)
    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 order in frequency:
        for offset in freq_chr_offset:
            i = 97 + offset - order
            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')) > 0:
                break
        else:
            continue
        break

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

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 re

def rot(i,s):
  s0 = 'abcdefghijklmnopqrstuvwxyz'
  sr = s0[i:] + s0[:i]
  s1 = '' 
  for i in range(len(s)):
      if s[i] in s0:
          s1 = s1 + sr[s0.find(s[i])]
      else:
          s1 = s1 + s[i]
  return(s1)

def cae(s):
  for i in range(26):
      ro =rot(i,s)
      if re.search(r'the',ro) or re.search(r'this',ro) or re.search(r'that',ro):
        return(rot(i,s))

if __name__ == "__main__":
    while True:
        try:
            s = input()
            print(cae(s))
        except:
            break

Python: import sys
for b in sys.stdin:
    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: import sys
  
def get_shifted_char(shift_count, ch):
    if ord(ch) >= ord('a') and ord(ch) <= ord('z'):
        return chr(((ord(ch)-71-shift_count) %26 + 97))
    else:
        return ch


for enc_text in sys.stdin:
    text_list = list(filter(lambda s:len(s)==3 or len(s)==4,enc_text.strip().split()))

    shift_count = 1

    while(shift_count < 27):
        flg = False
        for text in text_list:
            decoded = ''.join(list(map(lambda c:get_shifted_char(shift_count,c),text)))
            if decoded == "the" or decoded == "this" or decoded == "that":
                flg = True
        if flg:
            break
        shift_count += 1

    print(''.join(list(map(lambda c:get_shifted_char(shift_count,c),enc_text.strip()))))

Python: while True:
    try:
        s = input()
        for i in range(27):
            ans = ""
            for j in range(len(s)):
                ch = s[j]
                if "a" <= ch <= "z":
                    ans += chr((ord(ch) - ord("a") + i)%26 + ord("a"))
                else:
                    ans += ch
            if "this" in ans or "that" in ans or"the" in ans:
                print(ans)
                break
    except:
        break

Python: def slide(c):
    c = ord(c) + 1
    if c > ord('z'):
        c = ord('a')
    return chr(c)
    
while 1:
    try:
        s = input()
        ans = ""
        while 1:
            if "the" in s or "this" in s or "that" in s:
                print(s)
                break
            for i in range(0,len(s)):
                if ord(s[i]) >= ord('a') and ord(s[i]) <= ord('z'):
                    ans += slide(s[i])
                else:
                    ans += s[i]
            s = ans
            ans = ""
    except:
        break

Python: def decode(s, n):
    a = ""
    for i in s:
        if i.isalpha():
            a += chr((ord(i) - 97 + n) % 26 + 97)
        else:
            a += i
    return a

def judge(s):
    a = s.split()
    return "the" in a or "this" in a or "that" in a

while True:
    try:
        s = input()
    except:
        break
    for i in range(1, 26):
        a = decode(s, i)
        if judge(a):
            print(a)
            break

Python: s=input()

for _ in range(26):
    if "this " in s or "that " in s or "the " in s:
        print(s)
        break

    s=list(s)
    for i in range(len(s)):
        if ord(s[i]) <= ord("z") and ord(s[i]) >= ord("a"):
            if s[i] != "a":
                s[i] = chr(ord(s[i])-1)
            else:
                s[i] = "z"
    s="".join(s)

Python: import sys
for line in sys.stdin:
    for i in range(26):
        search = ""
        for idx in line:
            if 97 <= ord(idx) <= 122:
                if ord(idx) + i <= 122:
                    search += chr(ord(idx) + i)
                else:
                    search += chr(ord(idx) + i - 26)
            else:
                search += idx
        if 'the' in search or 'this' in search or 'that' in search:
            print(search)
            quit

Python: def ceasar(sentence, n):
    sentence = list(sentence)
    for i in range(len(sentence)):
        if sentence[i] in alphabets:
            sentence[i] = alphabets[(alphabets.index(sentence[i]) + n) % 26]
    return ''.join(sentence)
def is_right(sentence):
    words = '.'.join(sentence.split(' ')).split('.')
    return 'the' in words or 'this' in words or 'that' in words
alphabets = 'abcdefghijklmnopqrstuvwxyz'
while True:
    try:
        line = input()
        if line == '*':
            break
    except:
        break
    for i in range(26):
        if is_right(ceasar(line, i)):
            print(ceasar(line, i))
            break