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: # AOJ 0017 Caesar Cipher
# Python3 2018.6.21 bal4u

ch = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz"

while 1:
	try: s = list(input())
	except: break
	n = len(s)
	for i in range(26):
		t = ['']*n
		for j in range(n):
			if s[j] >= 'a' and s[j] <= 'z':
				t[j] = ch[ord(s[j])-ord('a')+i]
			else: t[j] = s[j]
		tt = ''.join(t)
		t = list(tt.split());
		if ("the" in t) or ("this" in t) or ("that" in t):
			print(tt)
			break

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=rot(str, i)
        if s.find("this")!=-1 or s.find("the")!=-1 or s.find("that")!=-1:
            return s
    return 'none'


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

Python: def judge_the(word):
	length=ord('t')-ord(word[0])
	if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
		return True
	else:
		return False

def judge_this(word):
	length=ord('t')-ord(word[0])
	if ord('h')-ord(word[1])==ord('i')-ord(word[2])==ord('s')-ord(word[3])==length:
		return True
	else:
		return False

def judge_that(woed):
	length=ord('t')-ord(word[0])
	if ord('h')-ord(word[1])==ord('a')-ord(word[2])==ord('t')-ord(word[3])==length:
		return True
	else:
		return False

def change(string,l):
	string1=""
	for i in range(len(string)):
		C=ord(string[i])+l
		if C<97:
			C+=26
		elif C>122:
			C-=26
		string1+=chr(C) if string[i]!='.' else '.'
	return string1



while True:
	A=list(map(str,input().split()))
	l=int()
	for i in A:
		if len(i)==3:
			if judge_the(i)==True:
				l=ord('e')-ord(i[2])
				break
		elif len(i)==4:
			if judge_this(i)==True :
				l=ord('i')-ord(i[2])
				break
			elif judge_that(i)==True:
				l=ord('a')-ord(i[2])
				break
	else:
		break#while?????????
	Ans=[""]*len(A)
	for i in range(len(A)):
		Ans[i]=change(A[i],l)

	print(" ".join(Ans))

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

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)

Python: import sys
a = 'abcdefghijklmnopqrstuvwxyz'

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

Python: def main():
    while True:
        try:
            words = input().split()
        except:
            break
        bl = False
        for i in range(1,26):
            ans = ""
            for word in words:
                s = ""
                for string in word:
                    os = ord(string)
                    if os == 46:
                        s = s + string
                    else:
                        if os - i < 97:
                            s += chr(122 - (97 - (os - i)))
                        else:
                            s += chr(os - i)
                if s in ("the", "this", "that"):
                  bl = True
                ans += " " + s
            if bl:
                break
        print(ans[1::])

if __name__ == "__main__":
    main()

Python: import sys
a='abcdefghijklmnopqrstuvwxyz'
for b in sys.stdin:
 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: from sys import stdin

def ascii2num(ascii):
    return ord(ascii) - 96

def num2ascii(num):
    return chr(num + 96)

def slide(word,num):
    return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])

def includekeyword(words):
    for word in words:
        if word in keywords:
            return True
    return False

keywords = ['the', 'this', 'that']


decode = []
for row in stdin:
    words = row.split()
    for num in range(1,27):
        tmp = [slide(word,num) for word in words]
        if includekeyword(tmp):
            decode = tmp
            print(' '.join(decode))

Python: import re

caesar_trans = str.maketrans("abcdefghijklmnopqrstuvwxyz", "zabcdefghijklmnopqrstuvwxy")

while True:
    try:
        i = input()
        while True:
            if re.search("(^| )(the|this|that)(\.| |$)", i) is not None:
                print(i)
                break
            i = i.translate(caesar_trans)
    except EOFError:
        break

Python: import sys
def rp(char,n):
    p=ord(char)+n
    if 97 <= p-n <= 122:
        if p<=122:
            return chr(p)
        else:
            return chr(p-122+96)
    else:
        return char

def find(str):
    for j in range(-25,25):
        l="".join([rp(i,j) for i in str])
        if "this" in l or "the" in l or "that" in l:
            return l

[print(i) for i in [find(text) for text in sys.stdin]]

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: basea = ord("a")
basez = ord("z")

def slide(c):
  ordc = ord(c)  
  diff = ordc - basea
  diff += 1
  diff %= 26
  return chr(basea + diff)

while True:
  try:
    s = input()
    while True:
      if "the" in s or "this" in s or "that" in s:
        print(s)
        break
      s = "".join([slide(c) if basea <= ord(c) <= basez else c for c in s])
  except EOFError:
    break