




from collections.abc import Generator
from math import sin


def 	UpperCAmelCase__      (      UpperCAmelCase__ :Optional[Any]					):






 '''simple docstring'''

 if len(__snake_case					) != 32:
  raise ValueError("Input must be of length 32"					)

 a						=		b""
 for i in [3, 2, 1, 0]:
  little_endian += string_aa[8 * i : 8 * i + 8]
 return little_endian


def 	UpperCAmelCase__      (      UpperCAmelCase__ :Dict					):






 '''simple docstring'''

 if i < 0:
  raise ValueError("Input must be non-negative"					)

 a						=		format(__snake_case ,					"08x"					)[-8:]
 a						=		b""
 for i in [3, 2, 1, 0]:
  little_endian_hex += hex_rep[2 * i : 2 * i + 2].encode("utf-8"					)
 return little_endian_hex


def 	UpperCAmelCase__      (      UpperCAmelCase__ :Optional[int]					):






 '''simple docstring'''

 a						=		b""
 for char in message:
  bit_string += format(__snake_case ,					"08b"					).encode("utf-8"					)
 a						=		format(len(__snake_case					) ,					"064b"					).encode("utf-8"					)

 # Pad bit_string to a multiple of 512 chars
 bit_string += b"1"
 while len(__snake_case					) % 5_12 != 4_48:
  bit_string += b"0"
 bit_string += to_little_endian(start_len[32:]					) + to_little_endian(start_len[:32]					)

 return bit_string


def 	UpperCAmelCase__      (      UpperCAmelCase__ :List[Any]					):






 '''simple docstring'''

 if len(__snake_case					) % 5_12 != 0:
  raise ValueError("Input must have length that\'s a multiple of 512"					)

 for pos in range(0 ,					len(__snake_case					) ,					5_12					):
  a						=		bit_string[pos : pos + 5_12]
  a						=		[]
  for i in range(0 ,					5_12 ,					32					):
   block_words.append(int(to_little_endian(block[i : i + 32]					) ,					2					)					)
  yield block_words


def 	UpperCAmelCase__      (      UpperCAmelCase__ :List[str]					):






 '''simple docstring'''

 if i < 0:
  raise ValueError("Input must be non-negative"					)

 a						=		format(__snake_case ,					"032b"					)
 a						=		""
 for c in i_str:
  new_str += "1" if c == "0" else "0"
 return int(__snake_case ,					2					)


def 	UpperCAmelCase__      (      UpperCAmelCase__ :Dict ,					UpperCAmelCase__ :Dict					):






 '''simple docstring'''

 return (a + b) % 2**32


def 	UpperCAmelCase__      (      UpperCAmelCase__ :List[Any] ,					UpperCAmelCase__ :List[str]					):






 '''simple docstring'''

 if i < 0:
  raise ValueError("Input must be non-negative"					)
 if shift < 0:
  raise ValueError("Shift must be non-negative"					)
 return ((i << shift) ^ (i >> (32 - shift))) % 2**32


def 	UpperCAmelCase__      (      UpperCAmelCase__ :Union[str, Any]					):






 '''simple docstring'''

 a						=		preprocess(__snake_case					)

 a						=		[int(2**32 * abs(sin(i + 1					)					)					) for i in range(64					)]

 # Starting states
 a						=		0x67_452_301
 a						=		0xef_cda_b89
 a						=		0x98_bad_cfe
 a						=		0x10_325_476

 a						=		[
     7,
     12,
     17,
     22,
     7,
     12,
     17,
     22,
     7,
     12,
     17,
     22,
     7,
     12,
     17,
     22,
     5,
     9,
     14,
     20,
     5,
     9,
     14,
     20,
     5,
     9,
     14,
     20,
     5,
     9,
     14,
     20,
     4,
     11,
     16,
     23,
     4,
     11,
     16,
     23,
     4,
     11,
     16,
     23,
     4,
     11,
     16,
     23,
     6,
     10,
     15,
     21,
     6,
     10,
     15,
     21,
     6,
     10,
     15,
     21,
     6,
     10,
     15,
     21,
 ]

 # Process bit string in chunks, each with 16 32-char words
 for block_words in get_block_words(__snake_case					):
  a						=		aa
  a						=		ba
  a						=		ca
  a						=		da

  # Hash current chunk
  for i in range(64					):
   if i <= 15:
    # f = (b & c) | (not_32(b) & d)     # Alternate definition for f
    a						=		d ^ (b & (c ^ d))
    a						=		i
   elif i <= 31:
    # f = (d & b) | (not_32(d) & c)     # Alternate definition for f
    a						=		c ^ (d & (b ^ c))
    a						=		(5 * i + 1) % 16
   elif i <= 47:
    a						=		b ^ c ^ d
    a						=		(3 * i + 5) % 16
   else:
    a						=		c ^ (b | not_aa(__snake_case					))
    a						=		(7 * i) % 16
   a						=		(f + a + added_consts[i] + block_words[g]) % 2**32
   a						=		d
   a						=		c
   a						=		b
   a						=		sum_aa(__snake_case ,					left_rotate_aa(__snake_case ,					shift_amounts[i]					)					)

  # Add hashed chunk to running total
  a						=		sum_aa(__snake_case ,					__snake_case					)
  a						=		sum_aa(__snake_case ,					__snake_case					)
  a						=		sum_aa(__snake_case ,					__snake_case					)
  a						=		sum_aa(__snake_case ,					__snake_case					)

 a						=		reformat_hex(__snake_case					) + reformat_hex(__snake_case					) + reformat_hex(__snake_case					) + reformat_hex(__snake_case					)
 return digest


if __name__ == "__main__":
     import doctest

     doctest.testmod()






from __future__ import annotations

from collections.abc import Iterable, Iterator
from dataclasses import dataclass

A_		:     List[str]        =     (3, 9, -11, 0, 7, 5, 1, -1)
A_		:     Optional[int]        =     (4, 6, 2, 0, 8, 10, 3, -2)



@dataclass
class 		_lowercase		:
   _UpperCAmelCase     	=			42
   _UpperCAmelCase     	=			42



class 		_lowercase		:

   def __init__(      self			:       List[Any]							,   __lowerCAmelCase			:       Iterable[int]							)       ->				None:


    """simple docstring"""






    a						=		None
    for i in sorted(__lowerCAmelCase							,   reverse=__lowerCAmelCase							):
     a						=		Node(__lowerCAmelCase							,   self.head							)

   def __iter__(      self			:       Union[str, Any]							)       ->				Iterator[int]:


    """simple docstring"""






    a						=		self.head
    while node:
     yield node.data
     a						=		node.next_node

   def __len__(      self			:       Tuple							)       ->				int:


    """simple docstring"""






    return sum(1 for _ in self							)




   def __str__(      self			:       Union[str, Any]							)       ->				str:


    """simple docstring"""






    return " -> ".join([str(__lowerCAmelCase							) for node in self]							)


def 	UpperCAmelCase__      (      UpperCAmelCase__ :SortedLinkedList ,					UpperCAmelCase__ :SortedLinkedList					):






 '''simple docstring'''

 return SortedLinkedList(list(UpperCAmelCase__					) + list(UpperCAmelCase__					)					)


if __name__ == "__main__":
     import doctest

     doctest.testmod()
     A_		:     Optional[Any]        =     SortedLinkedList
     print(merge_lists(SSL(test_data_odd), SSL(test_data_even)))

