


'''simple docstring'''






from __future__ import annotations

from collections.abc import Iterable
from dataclasses import dataclass
from typing import Any




class 			a  :
 _lowerCAmelCase			       =						("""_front""", """_back""", """_len""")




 @dataclass
 class 			a  :
  _lowerCAmelCase			       =						None
  _lowerCAmelCase			       =						None
  _lowerCAmelCase			       =						None





 class 			a  :
  _lowerCAmelCase			       =						("""_cur""",)
  def __init__(			self   ,					__magic_name__    )       ->				None:
       _a         =				cur
  def __iter__(			self    )       ->				Deque._Iterator:
       return self




  def 				__UpperCAmelCase		(			self    )       ->				Any:
       if self._cur is None:
            # finished iterating
            raise StopIteration
       _a         =				self._cur.val
       _a         =				self._cur.next_node

       return val





 def __init__(			self   ,					__magic_name__ = None    )       ->				None:
      _a         =				None
      _a         =				None
      _a         =				0

      if iterable is not None:
           # append every value to the deque
           for val in iterable:
                self.append(__magic_name__    )
 def 				__UpperCAmelCase		(			self   ,					__magic_name__    )       ->				None:
      _a         =				self._Node(__magic_name__   ,					__magic_name__   ,					__magic_name__    )
      if self.is_empty():
           # front = back
           _a         =				_a         =				node
           _a         =				1
      else:
           # connect nodes
           _a         =				node
           _a         =				self._back
           _a         =				node  # assign new back to the new node

           self._len += 1

           # make sure there were no errors
           assert not self.is_empty(), "Error on appending value."
 def 				__UpperCAmelCase		(			self   ,					__magic_name__    )       ->				None:
      _a         =				self._Node(__magic_name__   ,					__magic_name__   ,					__magic_name__    )
      if self.is_empty():
           # front = back
           _a         =				_a         =				node
           _a         =				1
      else:
           # connect nodes
           _a         =				self._front
           _a         =				node
           _a         =				node  # assign new front to the new node

           self._len += 1

           # make sure there were no errors
           assert not self.is_empty(), "Error on appending value."
 def 				__UpperCAmelCase		(			self   ,					__magic_name__    )       ->				None:
      for val in iterable:
           self.append(__magic_name__    )
 def 				__UpperCAmelCase		(			self   ,					__magic_name__    )       ->				None:
      for val in iterable:
           self.appendleft(__magic_name__    )
 def 				__UpperCAmelCase		(			self    )       ->				Any:
      assert not self.is_empty(), "Deque is empty."

      _a         =				self._back
      _a         =				self._back.prev_node  # set new back
      # drop the last node - python will deallocate memory automatically
      _a         =				None

      self._len -= 1

      return topop.val
 def 				__UpperCAmelCase		(			self    )       ->				Any:
      assert not self.is_empty(), "Deque is empty."

      _a         =				self._front
      _a         =				self._front.next_node  # set new front and drop the first node
      _a         =				None

      self._len -= 1

      return topop.val
 def 				__UpperCAmelCase		(			self    )       ->				bool:
      return self._front is None
 def __len__(			self    )       ->				int:
      return self._len
 def __eq__(			self   ,					__magic_name__    )       ->				bool:

      if not isinstance(__magic_name__   ,					__magic_name__    ):
           return NotImplemented

      _a         =				self._front
      _a         =				other._front

      # if the length of the dequeues are not the same, they are not equal
      if len(self    ) != len(__magic_name__    ):
           return False

      while me is not None and oth is not None:
           # compare every value
           if me.val != oth.val:
                return False
           _a         =				me.next_node
           _a         =				oth.next_node

      return True
 def __iter__(			self    )       ->				Deque._Iterator:
      return Deque._Iterator(self._front    )




 def __repr__(			self    )       ->				str:
      _a         =				[]
      _a         =				self._front
      while aux is not None:
           # append the values in a list to display
           values_list.append(aux.val    )
           _a         =				aux.next_node

      return f'[{", ".join(repr(__magic_name__    ) for val in values_list    )}]'


if __name__ == "__main__":
 import doctest

 doctest.testmod()





'''simple docstring'''






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if a < b:
          return gcd(lowerCAmelCase__					,    lowerCAmelCase__		)
     if a % b == 0:
          return b
     return gcd(lowerCAmelCase__					,    a % b		)






def 						_A					(lowerCAmelCase__	:int					,    lowerCAmelCase__	:int					,    lowerCAmelCase__	:int		) ->	int:




     '''simple docstring'''



     if y == 0:
          return 1
     _a         =				power(lowerCAmelCase__					,    y // 2					,    lowerCAmelCase__		) % mod
     _a         =				(temp * temp) % mod
     if y % 2 == 1:
          _a         =				(temp * x) % mod
     return temp






def 						_A					(lowerCAmelCase__	:int		) ->	bool:




     '''simple docstring'''



     _a         =				2
     while b < n:
          if gcd(lowerCAmelCase__					,    lowerCAmelCase__		) == 1 and power(lowerCAmelCase__					,    n - 1					,    lowerCAmelCase__		) != 1:
               return False
          b += 1
     return True


if __name__ == "__main__":
 a_       :     Any 							=     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.''')

