






"""simple docstring"""





A__					: int=	"""ABCDEFGHIJKLMNOPQRSTUVWXYZ"""







def   lowerCAmelCase_( )					->	None:
    """simple docstring"""

    UpperCamelCase__         =    input('Enter message: '					)
    UpperCamelCase__         =    input('Enter key [alphanumeric]: '					)
    UpperCamelCase__         =    input('Encrypt/Decrypt [e/d]: '					)

    if mode.lower().startswith('e'					):
        UpperCamelCase__         =    'encrypt'
        UpperCamelCase__         =    encrypt_message(SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					)
    elif mode.lower().startswith('d'					):
        UpperCamelCase__         =    'decrypt'
        UpperCamelCase__         =    decrypt_message(SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					)

    print(F'\n{mode.title()}ed message:'					)
    print(SCREAMING_SNAKE_CASE					)







def   lowerCAmelCase_( SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					)					->	str:
    """simple docstring"""

    return translate_message(SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE ,	'encrypt'					)







def   lowerCAmelCase_( SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					)					->	str:
    """simple docstring"""

    return translate_message(SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE ,	'decrypt'					)







def   lowerCAmelCase_( SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE ,	SCREAMING_SNAKE_CASE					)					->	str:
    """simple docstring"""

    UpperCamelCase__         =    []
    UpperCamelCase__         =    0
    UpperCamelCase__         =    key.upper()

    for symbol in message:
        UpperCamelCase__         =    LETTERS.find(symbol.upper()					)
        if num != -1:
            if mode == "encrypt":
                num += LETTERS.find(key[key_index]					)
            elif mode == "decrypt":
                num -= LETTERS.find(key[key_index]					)

            num %= len(SCREAMING_SNAKE_CASE					)

            if symbol.isupper():
                translated.append(LETTERS[num]					)
            elif symbol.islower():
                translated.append(LETTERS[num].lower()					)

            key_index += 1
            if key_index == len(SCREAMING_SNAKE_CASE					):
                UpperCamelCase__         =    0
        else:
            translated.append(SCREAMING_SNAKE_CASE					)
    return "".join(SCREAMING_SNAKE_CASE					)


if __name__ == "__main__":
  main()












"""simple docstring"""





def   lowerCAmelCase_( SCREAMING_SNAKE_CASE = 50_00_00_00					)					->	int:
    """simple docstring"""

    UpperCamelCase__         =    set()
    UpperCamelCase__         =    int((limit - 24) ** (1 / 2)					)

    UpperCamelCase__         =    set(range(3 ,	prime_square_limit + 1 ,	2					)					)
    primes.add(2					)
    for p in range(3 ,	prime_square_limit + 1 ,	2					):
        if p not in primes:
            continue
        primes.difference_update(set(range(p * p ,	prime_square_limit + 1 ,	SCREAMING_SNAKE_CASE					)					)					)

    for primea in primes:
        UpperCamelCase__         =    primea * primea
        for primea in primes:
            UpperCamelCase__         =    primea * primea * primea
            if square + cube >= limit - 16:
                break
            for primea in primes:
                UpperCamelCase__         =    primea * primea * primea * primea
                UpperCamelCase__         =    square + cube + tetr
                if total >= limit:
                    break
                ret.add(SCREAMING_SNAKE_CASE					)

    return len(SCREAMING_SNAKE_CASE					)


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




