Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func main() {
	for scanner.Scan() {
		var result string
		line := scanner.Text()
		key := make(map[string]string)

		var i int32
		for ; i < 52; i++ {
			makeKey(key, i)
			result = decode(key, line)

			if strings.Contains(result, "the") {
				break
			} else if strings.Contains(result, "this") {
				break
			} else if strings.Contains(result, "that") {
				break
			}
		}

		fmt.Println(result)
	}
}

func makeKey(key map[string]string, shift int32) {
	for i := 'a'; i <= 'z'; i++ {
		cipher := (i + shift)
		if cipher > 'z' {
			cipher = cipher%'z' + 'a' - 1
		} else if cipher < 'a' {
			cipher = cipher + ('z' - 'a') + 1
		}
		key[string(i)] = string(cipher)
	}
}

func decode(key map[string]string, cipher string) string {
	var result string
	for _, v := range cipher {
		if key[string(v)] != "" {
			result += key[string(v)]
		} else {
			result += string(v)
		}
	}
	return result
}

Python: import sys


def decrypt(c, i):
    """ ????????¶????????? """
    if c.isalpha():
        t = ord(c) - i
        if t < ord('a'):
            t += 26
        return chr(t)
    else:
        return c


if __name__ == '__main__':
    # ??????????????\???
    for line in sys.stdin:

        # ?????????????????????
        found = ''  # ?????????????????????
        for i in range(0, 26):
            decrypted = ''.join([decrypt(x, i) for x in line.strip()])
            # print(decrypted)
            if ' the ' in decrypted or ' this ' in decrypted or ' that ' in decrypted or \
                    decrypted.startswith('the ') or decrypted.startswith('this ') or decrypted.startswith('that '):
                found = decrypted
                break

        # ???????????????
        if found:
            print(found)

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: strs='abcdefghijklmnopqrstuvwxyz'      #use a string like this, instead of ord()
def shifttext(shift):
    inp=input('')
    data=[]
    for i in inp:                     #iterate over the text not some list
        if i.strip() and i in strs:                 # if the char is not a space ""
            data.append(strs[(strs.index(i) + shift) % 26])
        else:
            data.append(i)           #if space the simply append it to data
    output = ''.join(data)
    return output
print(shifttext(int(input())))

Python: import sys
a='abcdefghijklmnopqrstuvwxyz'
for b in sys.stdin:
 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.strip())

Python: #!/usr/bin/env python
#-*- coding:utf-8 -*-

import sys
import math

for s in sys.stdin:
    for i in range(26):
        state = list(s.strip())
        j = 0
        for d in state:
            if 'a' <= d and d <= 'z':
                state[j] = chr((ord(d) + i - ord('a')) % 26 + ord('a'))
            elif 'A' <= d and d <= 'Z':
                state[j] = chr((ord(d) + i - ord('A')) % 26 + ord('A'))
            j += 1

        state = "".join(state)

        if "the" in state or "this" in state or "that" in state:
            print(state)
            break

Python: def c(s, n):
    s = list(s)
    for i in range(len(s)):
        if s[i] in alphabets:
            s[i] = alphabets[(alphabets.index(s[i]) + n) % 26]
    return ''.join(s)
def is_right(s):
    words = '.'.join(s.split(' ')).split('.')
    return 'the' in words or 'this' in words or 'that' in words
alphabets = 'abcdefghijklmnopqrstuvwxyz'
while True:
    try:
        line = input()
        if line == '*':
            break
    except:
        break
    for i in range(26):
        if is_right(c(line, i)):
            print(c(line, i))
            break

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)):
    if (x[i]!=' ')and (x[i]!='.')and (x[i]!='\n'):
        print(chr(int(ord(x[i]))-dif1),end="")
    else:
        print(x[i],end="")
print(" ",end="")

Python: def decode(s, n):
    a = ""
    for i in s:
        if i.islower():
            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):
            print(a)
            break

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

for line in sys.stdin:
    print(caesar(line.rstrip()))

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) - 1
    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: 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:
            print("i is",i)
            if i in string:
                k=string.index(i)-20
                if(k>0):
                    k=26-string.index(i)-1+20
                    shift=((k))
                    break
                elif(k<0):
                    shift=(-1*k)
                else:
                    shift=k
print(shift)
shifttext(shift,inp)

Python: l = 'abcdefghijklmnopqrstuvwxyz'

while True:
    try:
        s = input()
    except:
        exit()
    for d in range(1,27):
        t = s[:-1].translate(str.maketrans(l,l[d:] + l[:d]))
        if 'that' in t or 'this' in t or 'that' in t:
            print(t + '.')
            break