Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func incrementByte(b byte) byte {
	if b >= 97 && b < 122 {
		return b + 1
	} else if b == 122 {
		return 97
	}
	return b
}

func main() {
	scanner.Split(bufio.ScanLines)

	for {
		line := nextString()
		if len(line) == 0 {
			break
		}
		for i := 0; i <= 26; i++ {
			decoded := []byte{}
			for j := 0; j < len(line); j++ {
				decoded = append(decoded, incrementByte(line[j]))
			}
			line = string(decoded)
			if strings.Contains(line, "the") || strings.Contains(line, "this") || strings.Contains(line, "that") {
				fmt.Println(line)
				break
			}
		}
	}
}

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)

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()
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: 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" in cipher_str or "this" in cipher_str or "that" in cipher_str:
            print(cipher_str, end="")
            break
    else:
        print(line, end="")

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: 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:
	try:
		A=list(map(str,input().split()))
		l=int()
		for i in A:
			if len(i)==3:
				if judge_the(i)==True:
					l=ord('t')-ord(i[0])
					break
			elif len(i)==4:
				if judge_this(i)==True or judge_that(i)==True:
					l=ord('t')-ord(i[0])
					break
		else:
			break#while?????????
		Ans=[""]*len(A)
		for i in range(len(A)):
			Ans[i]=change(A[i],l)

		print(" ".join(Ans))


	except EOFError:
		break

Python: while True:
    try:
        strings=input()

        for i in range(26):
            _strings=""
            for s in strings:
                if ord('a')<=ord(s) and ord(s)<=ord('z'):
                    _strings+=chr((ord(s)-ord('a')+1)%26+ord('a'))
                else:
                    _strings+=s
            strings=_strings
            if "the" in strings or "this" in strings or "that" in strings:
                print(strings)
                break
    except EOFError:
        break

Python: import string
import sys

a = string.ascii_lowercase
key = str.maketrans(a, a[1:] + a[:1])

for s in sys.stdin:
    for i in range(26):
        s = s.translate(key)
        if 'the' in s or 'this' in s or 'that' in s:
            break
    print(s, end="")

Python: 
while 1:
	try:
		s = raw_input()
		li = s.split()

		for i in li:
			if len(i) == 4 or len(i) == 3:
				a = ord(i[0]) - ord(i[1])
				b = ord(i[1]) - ord(i[2])
				c = ord(i[2]) - ord(i[3])
		
				if a == 12 and b == -1 and c == -10:
					n = ord(i[0]) - ord("t")
					break
				elif a == 12 and b == 3:
					n = ord(i[0]) - ord("t")
					break
				elif a == 12 and b == 7 and c == -19:
					n = ord(i[0]) - ord("t")
					break

		o = ""
		for c in s:
			if ord(c) >= 97 and ord(c) <= 122:
				o += chr(ord(c) - n)
			else:
				o += c

		print(o)
	except:
		exit()

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(27):
        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)
    return "nan"


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

Python: import sys
import string
f = sys.stdin

sentence = ''.join([line for line in f])

ceasar1 = str.maketrans(string.ascii_lowercase, string.ascii_lowercase[1:] + string.ascii_lowercase[:1])
for i in range(len(string.ascii_lowercase)):
    sentence = sentence.translate(ceasar1)
    for word in ['the', 'this', 'that']:
        if sentence.find(word) != -1:
            print(sentence)
            break