


'''simple docstring'''






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

__UpperCAmelCase					       =							TypeVar('''_T''')




class 	a__       (							Generic[_T]						):





							'''simple docstring'''






							def __init__(	self      ,					lowerCamelCase_ = None     ) ->							None:
														lowerCAmelCase__      =			list(iterable or []     )
														lowerCAmelCase__      =			[]







							def __len__(	self     ) ->							int:
														return len(self._stacka     ) + len(self._stacka     )







							def __repr__(	self     ) ->							str:
														return F"""Queue({tuple(self._stacka[::-1] + self._stacka     )})"""







							def 						__SCREAMING_SNAKE_CASE							(	self      ,					lowerCamelCase_     ) ->							None:
														self._stacka.append(lowerCamelCase_     )







							def 						__SCREAMING_SNAKE_CASE							(	self     ) ->							_T:
														lowerCAmelCase__      =			self._stacka.pop
														lowerCAmelCase__      =			self._stacka.append

														if not self._stacka:
																					while self._stacka:
																												stacka_append(stacka_pop()     )

														if not self._stacka:
																					raise IndexError('''Queue is empty'''     )
														return self._stacka.pop()


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

		testmod()



'''simple docstring'''






def       _snake_case     (  A )		->					int:
							return 1 if digit in (0, 1) else (digit * factorial(digit - 1 ))


def       _snake_case     (  A )		->					bool:
							lowerCAmelCase__      =			0
							lowerCAmelCase__      =			number
							while duplicate > 0:
														lowerCAmelCase__     ,      lowerCAmelCase__      =			divmod(A				,					10 )
														fact_sum += factorial(A )
							return fact_sum == number


if __name__ == "__main__":
		print('''Program to check whether a number is a Krisnamurthy Number or not.''')
		__UpperCAmelCase					       =							int(input('''Enter number: ''').strip())
		print(
		    f"""{number} is {'' if krishnamurthy(number) else 'not '}a Krishnamurthy Number."""
		)