not able to finish 1000, a simple backtrack problem