void build(int lvl, int n) {
        if (lvl == n) {
            List<String> result = new ArrayList<String>();
            for (int i = 0; i < n; i++) {
                result.add(buildString(line[i], n));
            }
            results.add(result);

        } else {
            for (int j = 1; j <= n; j++) {
                if (isValid(lvl, j)) {
                    line[lvl] = j;
                    build(lvl + 1, n);
                    line[lvl] = 0;
                }
            }
        }
    }