"""simple docstring"""


from __future__ import annotations

from bisect import bisect_left
from functools import total_ordering
from heapq import merge


@total_ordering
class        a				(		lowerCAmelCase_   ):


    def __lt__(					self	:  Any   ,				__lowerCAmelCase	:  Tuple					):
      return self[-1] < other[-1]


    def __eq__(					self	:  Any   ,				__lowerCAmelCase	:  Optional[int]					):
      return self[-1] == other[-1]






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  _UpperCAmelCase						 =      []
  # sort into stacks
  for element in collection:
    _UpperCAmelCase						 =      Stack([element]		)
    _UpperCAmelCase						 =      bisect_left(lowercase   ,lowercase		)
    if i != len(lowercase		):
      stacks[i].append(lowercase		)
    else:
      stacks.append(lowercase		)

    # use a heap-based merge to merge stack efficiently
  _UpperCAmelCase						 =      merge(*(reversed(lowercase		) for stack in stacks)		)
  return collection


if __name__ == "__main__":
    UpperCAmelCase__  		=						input("""Enter numbers separated by a comma:\n""").strip()
    UpperCAmelCase__  		=						[int(item) for item in user_input.split(""",""")]
    print(patience_sort(unsorted))

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