Chinese chess generals problem, output all valid positions