0
1
2
3
4
It reached iteration No. five
6
7
8
9

0
1
2
3
4
It reached the end