Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

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 scanner.Scan() {
		infos := strings.Split(scanner.Text(), " ")
		plain := make([]string, len(infos))
		// 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: import sys

words = list('abcdefghijklmnopqrstuvwxyz')
line = sys.stdin.read()
txt = ''
for sft in range(0,len(words)):
    txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in line])
    if 'the' in txt.split() or 'this' in txt.split() or 'that' in txt.split():
        break
print(txt)

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