"""simple docstring"""


def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  _UpperCAmelCase						 =      [0] * len(lowercase		)

  for i in range(1   ,len(lowercase		)		):
    # use last results for better performance - dynamic programming
    _UpperCAmelCase						 =      prefix_result[i - 1]
    while j > 0 and input_string[i] != input_string[j]:
      _UpperCAmelCase						 =      prefix_result[j - 1]

    if input_string[i] == input_string[j]:
      j += 1
    _UpperCAmelCase						 =      j

  return prefix_result






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  return max(prefix_function(lowercase		)		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

"""simple docstring"""


from __future__ import annotations






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  return [ord(lowercase		) - 96 for elem in plain]






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  return "".join(chr(elem + 96		) for elem in encoded		)






def     __UpperCAmelCase					(			):







  """simple docstring"""
  _UpperCAmelCase						 =      encode(input("""-> """		).strip().lower()		)
  print("""Encoded: """   ,lowercase		)
  print("""Decoded:"""   ,decode(lowercase		)		)


if __name__ == "__main__":
    main()
