import secrets
import string


def generate_room_code(size: int) -> str:
    """Generates a room code secret.

    Args:
        size (int): The number of characters in the room code.

    Returns:
        str: The room code.
    """
    return ''.join(secrets.choice(string.ascii_uppercase + string.digits) for _ in range(size))