

from __future__ import annotations

import random
from collections.abc import Iterable
from typing import Any, Generic, TypeVar

lowerCAmelCase_ 			=			TypeVar('''T''', bound=bool)





class 			snake_case_     (	Generic[T]      ):







			'''simple docstring'''

			def __init__(  self				:       Tuple							,     _UpperCamelCase				:       T							)   ->None:
									snake_case_     =			value
									snake_case_     =			None
									snake_case_     =			None







			@property
			def        snake_case__(  self				:       Optional[Any]							)   ->T:
									return self._value







			@staticmethod
			def        snake_case__(  _UpperCamelCase				:       RandomizedHeapNode[T] | None							,     _UpperCamelCase				:       RandomizedHeapNode[T] | None							)   ->RandomizedHeapNode[T] | None:
									if not roota:
															return roota

									if not roota:
															return roota

									if roota.value > roota.value:
															snake_case_,					snake_case_     =			roota, roota

									if random.choice([True, False]							):
															snake_case_,					snake_case_     =			roota.right, roota.left

									snake_case_     =			RandomizedHeapNode.merge(roota.left							,     _UpperCamelCase							)

									return roota






class 			snake_case_     (	Generic[T]      ):







			'''simple docstring'''

			def __init__(  self				:       Union[str, Any]							,     _UpperCamelCase				:       Iterable[T] | None = ()							)   ->None:
									snake_case_     =			None

									if data:
															for item in data:
																					self.insert(_UpperCamelCase							)







			def        snake_case__(  self				:       Optional[Any]							,     _UpperCamelCase				:       T							)   ->None:
									snake_case_     =			RandomizedHeapNode.merge(self._root							,     RandomizedHeapNode(_UpperCamelCase							)							)







			def        snake_case__(  self				:       Union[str, Any]							)   ->T | None:
									snake_case_     =			self.top()

									if self._root is None:
															return None

									snake_case_     =			RandomizedHeapNode.merge(self._root.left							,     self._root.right							)

									return result







			def        snake_case__(  self				:       List[Any]							)   ->T:
									if not self._root:
															raise IndexError('''Can\'t get top element for the empty heap.'''							)
									return self._root.value







			def        snake_case__(  self				:       List[Any]							)   ->None:
									snake_case_     =			None







			def        snake_case__(  self				:       List[Any]							)   ->list[Any]:
									snake_case_     =			[]
									while self:
															result.append(self.pop()							)

									return result







			def __bool__(  self				:       int							)   ->bool:
									return self._root is not None


if __name__ == "__main__":
					import doctest

					doctest.testmod()


def 						__SCREAMING_SNAKE_CASE      (SCREAMING_SNAKE_CASE__						,	SCREAMING_SNAKE_CASE__ ):
						return (input_a, input_a).count(0 ) % 2


def 						__SCREAMING_SNAKE_CASE      ():
						assert xor_gate(0						,	0 ) == 0
						assert xor_gate(0						,	1 ) == 1
						assert xor_gate(1						,	0 ) == 1
						assert xor_gate(1						,	1 ) == 0


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