3 1 2 10 2 1 20 2 2 30 2 3 40 3 2 50 0 0 0