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: base = ord('a')
az = [chr(j) for j in range(base, base+26)]
def crack(s):
    i = -1
    while True:
        new = []
        for c in s:
            if 96 < ord(c) < 123:
                new.append(az[(ord(c)-19+i)%26])
            else:
                new.append(c)
        i -= 1
        yield ''.join(new)
while True:
    try:
        s = input()
    except:
        break
    c = crack(s)
    while True:
        ans = next(c)
        if 'the' in ans or 'this' in ans or 'that' in ans:
            print(ans)
            break

Python: 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:
        break
print(ans)

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(1, 27):
        s = s.translate(key)
        if 'the' in s or 'this' in s or 'that' in s:
            break
    print(s, end="")

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' or 'this' 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

Python: d= dict(zip([chr(i) for i in range(97, 123)], [chr(i) for i in range(119,123)]+[chr(i) for i in range(97, 119)]))
while 1:
    try:
        for i in input():
            t= d.get(i)
            print(i if t== None else t, end='')
        print()
    except:
        break

Python: 
def cipher(s, k):
    l = list(s)
    r = []
    for i in l:
        if i.islower():
            i = chr((ord(i) - ord('a') + k)%26 + ord('a'))
        r.append(i)
    return "".join(r)

while True:
    wordset  = { "this", "that", "the" }
    try:
        s = input()

    except EOFError:
        break

    for i in range(0,26):
        t = cipher(s,i)
        w = set(t.split())
        if len(w & wordset ) > 0:
            print(t)
            break

Python: while True:
    try:
        s = input()
    except:
        exit()

    s = s[:-1].split()

    D = 0
    for word in s:
        if len(word) == 3:
            diff = []
            for c, d in zip(word, 'the'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 3:
                D = diff[0]
                break
        if len(word) == 4:
            diff = []
            for c, d in zip(word, 'that'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 4:
                D = diff[0]
                break
            diff = list([])
            for c, d in zip(word, 'this'):
                diff.append(ord(c) - ord(d))
            if diff.count(diff[0]) == 4:
                D = diff[0]
                break


    print(D)
    li = []
    for word in s:
        t = ""
        for c in word:
            t += chr( (ord(c) - ord('a') + 26 - D) % 26 + ord('a') )
        li.append(t)
    print(" ".join(li) + '.')

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


for cipher in sys.stdin:
    for k in range(26):
        decrypted = caesar_decrypt(k, cipher)
        if "this" in decrypted or "the" in decrypted or "that" in decrypted:
            print(decrypted)
            break

Python: import sys

while 1:
	try:
		s = sys.stdin.read()
		li = s.split()
		n = 0

		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: line = input().split(' ')
alpha_li = [chr(i) for i in range(97,97+26)]
keys = ['the','this','that']
idx_t = alpha_li.index('t')
def look_for_n(li):
    shift_n = alpha_li.index(li[0]) - idx_t
    if rot(shift_n,li) in keys: return(shift_n)
    else: return(False)
def rot(n,li):
    str = ''
    for s in li:
        if s.isalpha(): str += alpha_li[(alpha_li.index(s)-n)%25]
        else: str += s
    return(str)

for word in line:
    rot_n = look_for_n(list(word))
    if rot_n: break
for k,word in enumerate(line):
    line[k] = rot(rot_n,list(word))
print(' '.join(line))

Python: # -*- coding: utf-8 -*-

import sys
import os
from math import sin, cos
import math

alphabet = 'abcdefghijklmnopqrstuvwxyz'


def rotate_char(c, num):
    if c == ' ' or c == '.':
        return c

    n = ord(c) + num
    if n > 122:
        n -= 26
    return chr(n)

def rotate_string(s, num):
    ret = []
    for c in s:
        new_c = rotate_char(c, num)
        ret.append(new_c)
    return ''.join(ret)

s = input().strip()
for i in range(1, 26):
    rotated = rotate_string(s, i)
    if 'the' in rotated or 'this' in rotated or 'that' in rotated:
        print(rotated, end='')
        break

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:
    alphabets = string.ascii_lowercase
    frequency = [t[1] for t in sorted([(line.count(s), ord(s)) for s in alphabets], reverse=True)]
    freq_chr_offset = (4, 0, 19, 8, 14)
    ss = list(map(lambda word: word.strip('.\n'), line.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 line), end='')