data = [1, 3, 2, 5, 3, 1, 2]
result = []
z = 6
for n, i in enumerate(data):
if n == 0:
result.append(i)
else:
result.append(result[n-1] + i)
if result[n] > z:
result[n] = i
[print(f'{i[0]}:{i[1]}') for i in zip(data,result)]