from random import randint, seed
from itertools import accumulate


def find_index(lst: list) -> list:
    n = len(lst)
    s = sorted(map(lambda x: (x[1] % n, x[0]),
                   enumerate(accumulate(lst, initial=0))))
    for i in range(len(lst)):
        if s[i][0] == s[i+1][0]:
            return list(range(s[i][1] + 1, s[i+1][1] + 1))
    return None

seed(42)
n = 23
lst = [randint(0, 100) for _ in range(n)]
print(*lst)
res = find_index(lst)
if res:
    print(len(res))
    print(*res)
else:
    #
    print(-1)

print('\nпроверка')
res_lst = [str(lst[i-1]) for i in res]
res_sum = sum(lst[i-1] for i in res)
print(f"{' + '.join(res_lst)} = {n} * {res_sum // n} + {res_sum % n}")
