
d_the = [ [-14, 3],[12, -23],[12, 3] ] # the
d_this_that = [
    [-14, -1, -10], [-14, -1, 16], [-14, 25, -10], [12, -1, -10], # this
    [-14, 7, 7], [12, -19, 7], [12, 7, -19], # that
]

$dlist = d_the + d_this_that
$dlist.sort!

ALPHA = ("a".."z").to_a

def rotX(str, r)
    str.tr(ALPHA.join , ALPHA.rotate(r).join)
end

# s = "tha is it.that"
# (0..26).each do |r|
#     p rotX(s, r)
# end

def df(str)
    d = [str[0].ord - str[1].ord, str[1].ord - str[2].ord]
    if str.size == 4
        d.push str[2].ord - str[3].ord
    end
    d
end

def find_the_this_that(line)
    line.split(/[. \n]+/).each do |word|
        if(word.size == 3 or word.size == 4)
            ds = df(word)
            if($dlist.include?(ds))
                return 't'.ord - word[0].ord
            end
        end
    end
    0
end

STDIN.each_line {|line| 
    d = find_the_this_that(line)
    print rotX(line, d)
}