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: a = 'abcdefghijklmnopqrstuvwxyz'
s = input()
for n in range(1, 27):
    t = s.translate(str.maketrans(a, a[n:] + a[:n]))
    if 'the' in t or 'this' in t or 'that' in t: break
print(t)

Python: while True:
    try:
        s = input()[:-1].split()
    except:
        exit()
        
    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: 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(26):
        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)


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

Python: def func(s):
    while True:
        for i in range(26):
            li = []
            for word in s:
                t = ""
                for c in word:
                    t += chr( (ord(c) - ord('a') + i) % 26 + ord('a') )
                    print(t)
                li.append(t)
            if 'this' in li or 'that' in li or 'the' in li:
                print(" ".join(li) + '.')
                return


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

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

Python: import sys
for b in sys.stdin:
 for i in range(26):
  c=''.join([e,chr((ord(e)-96+i)%26+97)][96<ord(e)<123]for e in b)
  if any(('the'in c,'this'in c,'that'in c)):print(c.strip())

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

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().strip()
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: while(1):
	try:
		x = [i for i in input()]
		
		n=[ i for i in range(len(x))]
		p=ord('z')-ord(x[0])
		m=ord(x[0])-ord('a')
		flag=0
			
		for i in range(p+1):
			for j in range(len(x)):
				if x[j]==' ' or x[j]=='.' or x[j]=='\n':
					n[j]=x[j]
				else:
					n[j]=chr(ord(x[j])+i)
			moji=''
			for mk in n:
				moji += mk
			if moji.find('that')!=-1 or moji.find('this')!=-1 or moji.find('the')!=-1 :
				flag=1
				print(moji,end="")
		if flag==0:
			for i in range(1,m+1):
				for j in range(len(x)):
					if x[j]==' ' or x[j]=='.':
						n[j]=x[j]
					else:
						n[j]=chr(ord(x[j])-i)
				moji=''
				for mk in n:
					moji += mk
				if moji.find('that')!=-1 or moji.find('this')!=-1 or moji.find('the')!=-1 :
					print(moji,end="")
		print("")
	except EOFError:
		break

Python: import sys
a = "abcdefghijklmnopqrstuvwxyz"
x = str.maketrans(a, a[1:] + a[:1])
for s in sys.stdin:
    while True:
        s = s.translate(x)
        if "the" in s or "that" in s or "this " in s:
            print(s, end = "")
            break

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: import sys
for b in sys.stdin:
 for i in range(26):
  c=''.join([e,chr((ord(e)-96+i)%26+97)][96<ord(e)<123]for e in b)
  if any(('the'in c,'this'in c,'that'in c)):print(c.strip());break

Python: import sys

s = "abcdefghijklmnopqrstuvwxyz"

for line in sys.stdin:
  while True:
    if ("the" in line) or ("this" in line) or ("that" in line):
      break
    else:
      l = [i for i in line]
      for i in range(len(l)):
        if l[i] in s:
          a = s.index(l[i])
          l[i] = l[i].replace(l[i],s[(a+1)%26])
      line = "".join(l)
  print(line.rstrip())

Python: import sys
a='abcdefghijklmnopqrstuvwxy'
for b in sys.stdin:
 b=b.strip()
 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 i in sys.stdin.readlines():
    s = i.strip()
    for j in range(1, 27):
        t = s.translate(str.maketrans(a, a[j:] + a[:j]))
        if 'the' in t or 'this' in t or 'that' in t:
            print(t)

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)

while True:
    try:raw=input()
    except:break
    if raw=="":break
    for i in range(26):
        d=dec(raw,i)
        if sum([1 for i in ["the","this","that"] if i in d])>0:break
    print(d)

Python: A = 'abcdefghijklmnopqrstuvwxyz'
 
while True:
    try: s = input()
    except: exit()
 
    for x in range(1, 27):
        ans = s[:-1].translate(str.maketrans(A, A[x:] + A[:x]))
        if 'the' in ans or 'this' in ans or 'that' in ans:
            print(ans + '.')
            break