0 [1, 2, 1, 2, 2]
1 [2, 2, 2]
0 [2, 2]
0 [2]
5
1 1 1 1 1