




from __future__ import annotations

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





@total_ordering
class 	lowerCamelCase_							(				_SCREAMING_SNAKE_CASE ):


 '''simple docstring'''







 def __lt__(							self  :		List[Any]    ,    _lowerCAmelCase  :		List[Any]						):
       return self[-1] < other[-1]




 def __eq__(							self  :		Dict    ,    _lowerCAmelCase  :		int						):
       return self[-1] == other[-1]


def  UpperCAmelCase_							(				__UpperCAmelCase						:     list							) ->			list:
      SCREAMING_SNAKE_CASE_     						=      []
      # sort into stacks
      for element in collection:
            SCREAMING_SNAKE_CASE_     						=      Stack([element]							)
            SCREAMING_SNAKE_CASE_     						=      bisect_left(__UpperCAmelCase      ,      __UpperCAmelCase							)
            if i != len(__UpperCAmelCase							):
                  stacks[i].append(__UpperCAmelCase							)
            else:
                  stacks.append(__UpperCAmelCase							)

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


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





def  UpperCAmelCase_							(				__UpperCAmelCase						:     int      ,      __UpperCAmelCase						:     int							) ->			int:
      return int((input_a, input_a).count(0							) != 0							)

def  UpperCAmelCase_							(				) ->			None:
      assert nand_gate(0      ,      0							) == 1
      assert nand_gate(0      ,      1							) == 1
      assert nand_gate(1      ,      0							) == 1
      assert nand_gate(1      ,      1							) == 0


if __name__ == "__main__":
   print(nand_gate(0, 0))
   print(nand_gate(0, 1))
   print(nand_gate(1, 0))
   print(nand_gate(1, 1))