class EightQueens {

    public static List<Position> findSolution(int boardSize) {
        List<Position> generated;
        while (true) {
            generated = generate(boardSize);
            if (isSolution(generated))
                return generated;
        }
    }

}