Go: package main

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

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 reflect.DeepEqual(infos, []string{}) {
			break
		}
		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: # 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

Python: def main():

    check_words = ('the', 'this', 'that')

    caesar_chipher_text = tuple(map(str, input().split()))

    if __debug__:
        print(caesar_chipher_text)

    for i in range(26):
        after_text = []
        flag = False
        if __debug__:
            print('['+ str(i) + ']', end='')

        print('--------------for word in caesar_chipher_text: ---------------')

        for word in caesar_chipher_text:
            if __debug__:
                print(i)
                print('word: ' + word)

            after_word = []

            for char in word:
                if __debug__:
                    print(ord(char))

                char = slide_char(char, i)
                after_word.append(char)

            after_text.append(after_word)

            if ''.join(after_word) in check_words:
                if __debug__:
                    print('yes')
                flag = True

            if __debug__:
                print(after_word)

        if __debug__:
            print('dubug:', end='')
            print(after_text)


        if flag:
            anser = []
            for text in after_text:
                anser.append(''.join(text))

            print(' '.join(anser))
            break


if __name__ == '__main__':
    main()

Python: import sys

abc = 'abcdefghijklmnopqrstuvwxyz'
lines = sys.stdin.readlines()
for line in lines:
    for i in range(26):
        abcshift = abc[i:]+abc[:i]
        decode = line.translate(str.maketrans(abc, abcshift))
        if 'the' in decode or 'this' in decode or 'that' in decode:
            print(decode, end = '')
            break