object Main extends App {

  def move(i: Int)(c: Char): Char =
    if (c == ' ' || c == '.') c
    else ((c.toInt + i - 97) % 26 + 97).toChar

  def decryption(line: String) =
    (1 until 26)
      .map(i => line.map(move(i)).toString)
      .filter(l => Set("this", "that", "the").exists(l.contains))
      .head

//  Stream
//    .continually(readLine)
//    .takeWhile(_ != null)
//    .map(decryption)
//    .foreach(println)
  println(decryption(readLine))
}
