
'''simple docstring'''







from __future__ import annotations







def   lowerCAmelCase(  a__    :  int      , a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       assert n > 1 and a > 0 and greatest_common_divisor(a__      , a__      ) == 1
       ((lowerCamelCase__)   ,		(lowerCamelCase__)   ,		(lowerCamelCase__))				   =      extended_gcd(a__      , a__      )  # Implemented below
       lowerCamelCase__				   =      (b * s) % n
       return x







def   lowerCAmelCase(  a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       ((lowerCamelCase__)   ,		(lowerCamelCase__))				   =      extended_euclid(a__      , a__      )  # Implemented below
       if b < 0:
              lowerCamelCase__				   =      (b % n + n) % n
       return b







def   lowerCAmelCase(  a__    :  int      , a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       lowerCamelCase__				   =      invert_modulo(a__      , a__      )
       lowerCamelCase__				   =      (b * s) % n
       return x







def   lowerCAmelCase(  a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       assert a >= 0 and b >= 0

       if b == 0:
              lowerCamelCase__   ,		lowerCamelCase__   ,		lowerCamelCase__				   =      a, 1, 0
       else:
              ((lowerCamelCase__)   ,		(lowerCamelCase__)   ,		(lowerCamelCase__))				   =      extended_gcd(a__      , a % b      )
              lowerCamelCase__				   =      q
              lowerCamelCase__				   =      p - q * (a // b)

       assert a % d == 0 and b % d == 0
       assert d == a * x + b * y

       return (d, x, y)







def   lowerCAmelCase(  a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       if b == 0:
              return (1, 0)
       ((lowerCamelCase__)   ,		(lowerCamelCase__))				   =      extended_euclid(a__      , a % b      )
       lowerCamelCase__				   =      a // b
       return (y, x - k * y)







def   lowerCAmelCase(  a__    :  int      , a__    :  int      ):







       '''simple docstring'''






       if a < b:
              lowerCamelCase__   ,		lowerCamelCase__				   =      b, a

       while a % b != 0:
              lowerCamelCase__   ,		lowerCamelCase__				   =      b, a % b

       return b


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

    testmod(name="modular_division", verbose=True)
    testmod(name="modular_division2", verbose=True)
    testmod(name="invert_modulo", verbose=True)
    testmod(name="extended_gcd", verbose=True)
    testmod(name="extended_euclid", verbose=True)
    testmod(name="greatest_common_divisor", verbose=True)



'''simple docstring'''







from collections import defaultdict







def   lowerCAmelCase(  a__    :  int = 5      ):







       '''simple docstring'''






       lowerCamelCase__				   =      defaultdict(a__      )
       lowerCamelCase__				   =      0

       while True:
              lowerCamelCase__				   =      get_digits(a__      )
              freqs[digits].append(a__      )

              if len(freqs[digits]      ) == max_base:
                     lowerCamelCase__				   =      freqs[digits][0] ** 3
                     return base

              num += 1







def   lowerCAmelCase(  a__    :  int      ):







       '''simple docstring'''






       return "".join(sorted(str(num**3      )      )      )


if __name__ == "__main__":
    print(f'{solution() = }')

