0 1 1000 1 5 9 0 3 2 1000 1000 1000 0 4 1000 1000 1000 2 0 3 3 1000 1000 1000 0