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: t = ord("t")
z = ord("z")
a = ord("a")

def _decode(tv, v):
    spam = ord(v)
    if not (a <= spam <= z):
        return v

    x = t - ord(tv)
    y = spam + x

    if y > z:
        y = a + (y % z)
    elif y < a:
        y = z - (a - y - 1)

    return chr(y)

while 1:
    try:
        txt = input()
        for s in [x for x in txt.split() if 3 <= len(x) <= 4]:
            tv = s[0]
            dec_val = ''.join(list(map(lambda x:_decode(tv,x),s)))

            if (dec_val in ('this', 'the', 'that')):
                print(''.join(list(map(lambda x:_decode(tv,x),txt))))
                break
    except:
        break

Python: import sys
def l(s,n):
    o=ord(s)+n
    if 97<=o<=122:
        return chr(o)
    elif o>123:
        return chr(o-26)
    else:
        return s

for t in sys.stdin:
    s=t[:-1]
    for i in range(1,26):
        e=lambda s:l(s,i)
        if "".join(map(e,"this")) in s:
            break
        if "".join(map(e,"that")) in s:
            break
        if "".join(map(e,"the")) in s:
            break
    print("".join(map(lambda x:l(x,-i),s)))

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)
            break

Python: # coding: utf-8

def contain_the(char):
	for i in range(len(char)):
		try:
			if char[i] == 't' and char[i+1] == 'h' and (char[i+2] == 'e' or (char[i+2] == 'i' and char[i+3] == 's') or (char[i+2] == 'a' and char[i+3] == 't')):
				return 1
		except IndexError:
			return 0

while True:
	try:
		data = raw_input()
		delta = 1
		while True:
			char = ""
			for i in range(len(data)):
				if data[i] != '.' and data[i] != ' ':
					char += chr(ord(data[i]) - delta)
				else:
					char += data[i]
			if (contain_the(char) == 1):
				print(char)
				break
			else:
				delta += 1
			print("*")
	except EOFError:
		print("**")
		break

Python: while True:
    try:
        b = input()
    except:
        break
    for i in range(1,26):
        c = ''
        for j in b:
            if(j == 'z'):
                c += ('a')
            elif(str.isalpha(j) == 1):
                c += (chr(ord(j) + 1))
            else:
                c += j
        if 'the' in c or 'this' in c or 'that' in c:
            print(c)
            break
        b = c

Python: def chg(s,n):
    res=""
    for i in s:
        o=ord(i)
        if 97<=o<=122:
            if o+n<=122:
                res+=chr(o+n)
            else:
                res+=chr(o+n-26)
        else:
            res+=i
    return res

while True:
    try:
        s=input()
        for i in range(26):
            c=chg(s,i)
            if ("the" or "this" or "that") in list(c.split()):
                print(c)
                break
    except:
        break

Python: 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):
    for i in range(26):
        s=".".join(rot(str, i).split()).split(".")
        if "the" in s or "that" in s or "this" in s:
            return rot(str,i)
    return 'none'


while True:
    try:
        line = input()
        print(caesar(line))
    except:
        break

Python: import sys

a = 'abcdefghijklmnopqrstuvwxyz'
for i in sys.stdin.readlines():
    s = i.strip()
    for j in range(1, 26):
        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 decode(s, n):
    a = ""
    for i in s:
        if i.isalpha():
            a += chr((ord(i) - 97 + n) % 26 + 97)
        else:
            a += i
    return a

def judge(s):
    a = s.split()
    return "the" in a or "this" in a or "that" in a

while True:
    try:
        s = input()
    except:
        break
    for i in range(1, 26):
        a = decode(s, i)
        if judge(a):
            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(1, 27):
        s = s.translate(key)
        if 'the' in s or 'this' in s or 'that' in s:
            break
    print(s)

Python: string='abcdefghijklmnopqrstuvwxyz'
def shifttext(shift,inp):
    s=[]
    for i in inp:
        if i.strip() and i in string:
            s.append(string[(string.index(i) + shift) % 26])
        else:
            s.append(i)
    output = ''.join(s)
    print (output)
inp=input('')
c=[]
words=inp.split()
for word in words:
    if(len(word)==3):
        for i in word:

            if i in string:
                k=string.index(i)-19
                if(k>0):
                    k=26-string.index(i)-1+20
                    shift=((k))
                    break
                elif(k<0):
                    shift=(-1*k)
                else:
                    shift=k
    elif(len(word)==4):
         for i in word:
              if i in string:
                k=string.index(i)-19
                if(k>0):
                    k=26-string.index(i)-1+20
                    shift=((k))
                    break
                elif(k<0):
                    shift=(-1*k)-1
                else:
                    shift=k

shifttext(shift,inp)

Python: x=[i for i in input()]
i=0
y=[0 for i in range(4)]
dif1=0
while(i<len(x)-1):
    s=0
    for j in range(4):
        if (x[j]!=' ')and (x[j]!='.')and (x[j]!='\n'):
            y[j]=x[j]
            s=j
        else:
            s=j
            break       
    if s==3 or s==2:
        dif1=ord(y[0])-ord('t')
        dif2=ord(y[1])-ord('h')
        if dif1==dif2:
            if s==2 and ord(y[2])-dif1==ord('e'):
                break
            else:
                if ord(y[2])-dif1==ord('a') :
                    if y[0]==y[3]:
                        break
                    else:
                        i=i+s+1
                elif ord(y[2])-dif1==ord('i'):
                    if ord(y[3])-dif1==ord('s'):
                        break
                    else:
                        i=i+s+1
                else:
                    i=i+s+1
        else:
            i=i+s+1
            
    else:
        i=i+s+1
for i in range(len(x)-1):
    if (x[i]!=' ')and (x[i]!='.')and (x[i]!='\n'):
        print(chr(int(ord(x[i]))-dif1),end="")
    else:
        print(x[i],end="")
print(x[len(x)-1])