Chess N Figures problem