from collections import deque

q = deque(maxlen=3)

for n in range(10):
	q.append(n)
	print(q)