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: # 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()
for k in range(26):
    decrypted = caesar_decrypt(k, cipher)
    if "this" in decrypted or "the" in decrypted or "that" in decrypted:
        print(decrypted)
        break

Python: '''
Created on Mar 22, 2013

@author: wukc
'''

from sys import stdin 

def shift(s):
    return ["".join([chr(97+(ord(x)-97+t)%26) if x.islower() else x for x in s]) for t in range(26)]

target=["this","the","that"]

s=stdin.readline()

for x in shift(s):
    if sum(map(x.count,target))>0:
        print(x)

Python: import string
import sys

example = string.ascii_lowercase

def make(x, y, z, a, b, c = True) :
    if x - a < 0 : y = 26 + (x - a)
    else : y = x - a
    if x - b < 0 : z = 26 + (z - b)
    else : z = x - b
    if c != True :
        if x - c < 0 : n = 26 + (x - c)
        else : n = x - c
    if c != 0 : return (example[x] + example[y] + example[z])
    else : return (example[x] + example[y] + example[z])
    
def solve(temp, number) :
    new_temp = []
    if number > 19 : number = number - 19
    else : number = 19 - number
    for _ in temp :
        if _ == ' ' or _ == '.' : new_temp.append(_)
        elif _ - number < 0 : new_temp.append(26 + (_ - number))
        else : new_temp.append(_ - number)
    temp = ''
    for _ in new_temp :
        if _ == ' ' or _ == '.' : temp += _
        else : temp += example[_]
    return temp

for input_string in sys.stdin :
    test = input_string
    temp = []
    for _ in test : 
        if _ == ' ' or _ == '.' : temp.append(_)
        elif _ in example : temp.append(example.index(_))

    check = 0
    the = []
    for _ in range(26) : the.append(make(_, _, _, 12, 15))
    for number, _ in enumerate(the) :
        if _ in test :
            print(solve(temp, number))
            check = 1
    
    if check == 1 :
        this = []
        for _ in range(26) : this.append(make(_, _, _, 12, 13, 24))
        for number, _ in enumerate(this) :
            if _ in test :
                print(solve(temp, number))
                check = 1
    
    if check == 1 :
        that = []
        for _ in range(26) : this.append(make(_, _, _, 12, 13, 24))
        for number, _ in enumerate(this) :
            if _ in test : print(solve(temp, number))

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

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

Python: s = input()
a = "abcdefghijklmnopqrstuvwxyz"
i = 1
while True:
    t = s.translate(str.maketrans(a, a[i:] + a[:i]))
    if "the" in t or "that" in t or "this" in t:
        print(t)
        break
    i += 1

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 s in map(list, sys.stdin.readlines()):
    while True:
        for i, c in enumerate(s):
            char_code = ord(c)
            if 97 <= char_code <= 122:
                char_code = char_code+1 if char_code < 122 else 97
                s[i] = chr(char_code)

        _s = "".join(s)
        if "this" in _s or "the" in _s or "that" in _s:
            print(_s)
            break

Python: def judge_the(word):
	length=ord('t')-ord(word[0])
	if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
		return True
	else:
		return False
while True:
	try:
		A=list(map(str,input().split()))
		l=int()
		for i in A:
			if len(i)==3:
				if judge_the(i)==True:
					l=ord('t')-ord(i[0])
					break
		for i in A:
			for c in i:
				C=ord(c)+l
				if C<97:
					C+=26
				if c=='.':
					print(c,end="")
				else:
					print(chr(C),end="")
			if i!=A[-1]:
				print(end=" ")
			else:
				print()
	except EOFError:
		break

Python: s = input()
for i in range(26):
    ans = ""
    for j in range(len(s)):
        ch = s[j]
        if "a" <= ch <= "z":
            ans += chr((ord(ch) - ord("a") + i)%26 + ord("a"))
        else:
            ans += ch
    if "this" in ans or "that" in ans or"the" in ans:
        break
print(ans)

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, end="")
            break
    else:
        print(line, end="")

Python: import sys;

for line in sys.stdin:
	if (line.find('the') != -1) | (line.find('this') != -1) | (line.find('that') != -1):
		print(line);
		continue;
		
	alpha = 'abcdefghijklmnopqrstuvwxyz';
	for i in range(1, 26):
		str = '';
		for j in range(len(line) - 1):
			if ((line[j] == ' ') | (line[j] == '.')):
				str += line[j];
				continue;
			
			index = alpha.find(line[j]);
			str += alpha[(index + i) % 26];
		
		if (str.find('the') != -1) | (str.find('this') != -1) | (str.find('that') != -1):
			print(str);
			break;

Python: # -*- coding: utf-8 -*-

import sys
import os
from math import sin, cos
import math

alphabet = 'abcdefghijklmnopqrstuvwxyz'


def rotate_char(c, num):
    if c == ' ' or c == '.':
        return c

    n = ord(c) + num
    if n > 122:
        n -= 26
    return chr(n)

def rotate_string(s, num):
    ret = []
    for c in s:
        new_c = rotate_char(c, num)
        ret.append(new_c)
    return ''.join(ret)

s = input().strip()
for i in range(1, 26):
    rotated = rotate_string(s, i)
    if 'the' in rotated or 'this' in rotated or 'that' in rotated:
        print(rotated)
        break

Python: import string
import sys

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