def get_digits_matching_next(captcha, step_size=1):
    """Get digits from captcha that are matching next step_size digit."""
    matching_digits = []
    for index, digit in enumerate(captcha):
        next_index = (index + step_size) % len(captcha)
        if digit == captcha[next_index]:
            matching_digits.append(digit)
    return matching_digits