1 loop1 2 0 3 1 4 2 5 3 6 4 7 5 8 done1 9 loop2 10 0 11 0 12 done2