




'''simple docstring'''







def 					lowerCamelCase__							(			__lowercase    ,      __lowercase							):
     if a < b:
          return gcd(__lowercase    ,      __lowercase							)
     if a % b == 0:
          return b
     return gcd(__lowercase    ,      a % b							)



def 					lowerCamelCase__							(			__lowercase    ,      __lowercase    ,      __lowercase							):
     if y == 0:
          return 1
     snake_case :			Any					   = power(__lowercase    ,      y // 2    ,      __lowercase							) % mod
     snake_case :			int					   = (temp * temp) % mod
     if y % 2 == 1:
          snake_case :			List[str]					   = (temp * x) % mod
     return temp



def 					lowerCamelCase__							(			__lowercase							):
     snake_case :			Tuple					   = 2
     while b < n:
          if gcd(__lowercase    ,      __lowercase							) == 1 and power(__lowercase    ,      n - 1    ,      __lowercase							) != 1:
               return False
          b += 1
     return True


if __name__ == "__main__":
      lowercase			:      str			=					int(input("""Enter number: """).strip())
      if is_carmichael_number(number):
            print(F"""{number} is a Carmichael Number.""")
      else:
            print(F"""{number} is not a Carmichael Number.""")









'''simple docstring'''







from dataclasses import dataclass

lowercase			:      Tuple			=					"""0.1"""
lowercase			:      Optional[Any]			=					"""Lucia Harcekova"""







@dataclass
class 				_a   :





     '''simple docstring'''



     lowerCAmelCase_     :    int
     lowerCAmelCase_     :    int
     lowerCAmelCase_     :    str







     def __repr__(							self       )			->							str:
          return F'''({self.offset}, {self.length}, {self.indicator})'''







class 				_a   :





     '''simple docstring'''



     def __init__(							self       ,__a = 13       ,__a = 6       )			->							None:
          snake_case :			Dict					   = window_size
          snake_case :			Any					   = lookahead_buffer_size
          snake_case :			str					   = self.window_size - self.lookahead_buffer_size







     def  snake_case_			(							self       ,__a       )			->							list[Token]:
          snake_case :			Tuple					   = []
          snake_case :			Optional[int]					   = """"""

          # while there are still characters in text to compress
          while text:
               # find the next encoding phrase
               # - triplet with offset, length, indicator (the next encoding character)
               snake_case :			str					   = self._find_encoding_token(__a       ,__a       )

               # update the search buffer:
               # - add new characters from text into it
               # - check if size exceed the max search buffer size, if so, drop the
               #   oldest elements
               search_buffer += text[: token.length + 1]
               if len(__a       ) > self.search_buffer_size:
                    snake_case :			List[Any]					   = search_buffer[-self.search_buffer_size :]

               # update the text
               snake_case :			str					   = text[token.length + 1 :]

               # append the token to output
               output.append(__a       )

          return output







     def  snake_case_			(							self       ,__a       )			->							str:
          snake_case :			Union[str, Any]					   = """"""

          for token in tokens:
               for _ in range(token.length       ):
                    output += output[-token.offset]
               output += token.indicator

          return output







     def  snake_case_			(							self       ,__a       ,__a       )			->							Token:

          if not text:
               raise ValueError("""We need some text to work with."""       )

          # Initialise result parameters to default values
          snake_case   ,		snake_case :			int					   = 0, 0

          if not search_buffer:
               return Token(__a       ,__a       ,text[length]       )

          for i, character in enumerate(__a       ):
               snake_case :			Tuple					   = len(__a       ) - i
               if character == text[0]:
                    snake_case :			List[Any]					   = self._match_length_from_index(__a       ,__a       ,0       ,__a       )
                    # if the found length is bigger than the current or if it's equal,
                    # which means it's offset is smaller: update offset and length
                    if found_length >= length:
                         snake_case   ,		snake_case :			Optional[Any]					   = found_offset, found_length

          return Token(__a       ,__a       ,text[length]       )







     def  snake_case_			(							self       ,__a       ,__a       ,__a       ,__a       )			->							int:
          if not text or text[text_index] != window[window_index]:
               return 0
          return 1 + self._match_length_from_index(
              __a       ,window + text[text_index]       ,text_index + 1       ,window_index + 1       )


if __name__ == "__main__":
      from doctest import testmod

      testmod()
      # Initialize compressor class
      lowercase			:      int			=					LZaaCompressor(window_size=13, lookahead_buffer_size=6)

      # Example
      lowercase			:      int			=					"""cabracadabrarrarrad"""
      lowercase			:      str			=					lzaa_compressor.compress(TEXT)
      print(lzaa_compressor.compress("""ababcbababaa"""))
      lowercase			:      List[Any]			=					lzaa_compressor.decompress(compressed_text)
      assert decompressed_text == TEXT, "The LZ77 algorithm returned the invalid result."



