output: 0 2 3 3 2