Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

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 {
		infos := strings.Split(nextString(), " ")
		plain := make([]string, len(infos))
		if reflect.DeepEqual(infos, []string{}) {
			break
		}
		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: 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)
                    break
                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)
                    break
                else:
                    shift=k

shifttext(shift,inp)

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

Python: a='abcdefghijklmnopqrstuvwxy'
b=input()
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);break

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)
raw=input()

for i in range(25):
    d=dec(raw,i+1)
    if sum([1 for i in ["the","this","that"] if i in d])>0:break
print(d)

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

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

Python: def main():
    ex =[ord(".")]
    answer = []
    while True:
        try:
            words = input().split()
        except:
            break
        bl = False
        for i in range(1,26):
            ans = ""
            for word in words:
                s = ""
                for string in word:
                    os = ord(string)
                    if os in ex:
                        s = s + string
                    else:
                        if os - i < 97:
                            s += chr(122 - (97 - (os - i)))
                        else:
                            s += chr(os - i)
                if s in ("the", "this", "that", "the.", "this.", "that."):
                  bl = True
                ans += " " + s
            if bl:
                break
        answer.append(ans[1::])
    print(*answer, sep="\n")

if __name__ == "__main__":
    main()

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'


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

Python: s = list(map(str,input()))
t = []
for c in s:
    t.append(ord(c))    

for i in range(26):
    string = ''
    for j in range(len(s)):
        if t[j] >= 97 and 122 >= t[j]:
            l = 97 + ((t[j] - 97 + i) % 26)
            string += chr(l)
            
        else:
            string += chr(t[j])
    if 'this' in string or 'the' in string or 'that' in string:
        print(string)

Python: letters = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
while True:
  try:
    s = input()
  except:
    break
    
  l = len(s)
  for i in range(26):
    t = ""
    for j in range(len(s)):
      c = s[j]
      if 'a' <= c and c <= 'z':
        x = letters.index(c)
        cc = letters[(x + i) % 26]
        t += cc
      else:
         t += c
    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.islower():
            o = ord(i) + n
            if o <= 122:
                a += chr(o)
            else:
                a += chr(o - 26)
        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: from sys import stdin

def ascii2num(ascii):
    return ord(ascii) - 96

def num2ascii(num):
    return chr(num + 96)

def slide(word,num):
    return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])

def includekeyword(words):
    for word in words:
        if word in keywords:
            return True
    return False

keywords = ['the', 'this', 'that']


decode = []
for row in stdin:
    words = row.split()
    for num in range(1,27):
        tmp = [slide(word,num) for word in words]
        print (tmp)
        if includekeyword(tmp):
            decode = tmp
            break