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: import sys
def main():
    ex = ["the", "this", "that"]
    lc = [chr(i) for i in range(97, 97 + 26)]
    #lowwer case

    for line in sys.stdin:
        s = line.split()

        for i in range(len(s)):
            a = s[i]
            cnt = 0
            while a not in ex and cnt < 25:
                a = list(a)
                for j in range(len(a)):
                    if a[j] == "z":
                        a[j] = "a"
                    elif a[j] == ".":
                        pass
                    else:
                        a[j] = lc[lc.index(a[j]) + 1]
                hoge = ""
                for j in a:
                    hoge += j

                a = hoge
                cnt += 1
            if cnt != 25:
                break

        for i in range(len(s)):
            a = list(s[i])
            for j in range(len(a)):
                if a[j] == ".":
                    pass
                else:
                    fuga = lc.index(a[j]) + cnt
                    if fuga > 25:
                        a[j] = lc[fuga - 26]
                    else:
                        a[j] = lc[fuga]
            else:
                hoge = ""
                for k in a:
                    hoge += k
                else:
                    s[i] = hoge

        for i in s:
            print(i, end = " ")
        print()
        print()


if __name__ == "__main__":
    main()

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(22))

Python: import string
strings = string.ascii_lowercase
clues = [(19, 7, 8, 18), (19, 7, 0, 19), (19, 7, 4)]
while True:
    try:
        data = input()
    except:
        break
    for word in data.split():
        if len(word) == 4 or 3:
            dif = 19 - (ord(word[0]) - 97)
            enc = ["" for _ in range(26)]
            for k, v in zip([i for i in range(dif, dif+26)], strings):
                enc[k%26] = v
            candidate = tuple(enc.index(c) for c in word)
            try:
                clues.index(candidate)
            except:
                continue
            break
    ans = ""
    for c in data:
        try:
            ans += strings[enc.index(c)]
        except:
            ans = ans + "." if c == "." else ans + " "
    print(ans)

Python: ca = ord('a')
def convert(s, d):
    res = []
    for c in s:
        if c not in ' .':
            c = chr(((ord(c) - ca + d) % 26) + ca)
        res.append(c)
    return "".join(res)
for line in open(0).readlines():
    s = line.strip()
    for d in range(26):
        s0 = convert(s, d)
        if "the" in s0 or "this" in s0 or "that" in s0:
            print(s0)
            break

Python: def restore(n,text):
    text_list=list(text)
    for i,j in enumerate(text_list):
        if ord(j)!=46 and ord(j)!=32:
            nw=ord(j)-n
            if nw<97:
                nw=ord(j)-n+26
            text_list[i]=chr(nw)
    print(''.join(map(str,text_list)))

def textsa(text):
    str_list=list(text)
    n=len(str_list)
    sa=[]
    for i in range(n-1):
        sa.append((ord(str_list[i+1])-ord(str_list[i]))%26)
    sa.append((ord(str_list[0])-ord(str_list[n-1]))%26)
    return sa


while True:
    try:
        text=input()
        wordlist=list(map(str,text.split()))
        for i in wordlist:
            if textsa(i)==[14,1,10,1] or textsa(i)==[14,19,19,0] or textsa(i)==[14,23,15]:
                n=ord(list(i)[0])-ord('t')
        restore(n,text)
    except:
        break

Python: s = raw_input()
li = s.split()

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)

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