import random
import string


def random_string(N):
    """Return a random ascii_uppercase + digits string of length `N`"""
    return ''.join(random.choice(string.ascii_uppercase + string.digits)
                   for _ in range(N))