public static String[] print(int[] result) {
         String[] w = new String[result.length];
         for (int i=0; i<w.length; i++) w[i] = "";
         for (int i=0; i<result.length; i++) {
             for (int j=0; j<result.length; j++) {
                 if(j == result[i]) {
                     w[i] = w[i] + "Q";
                 }
                 else {
                     w[i] = w[i] + ".";
                 }
             }
         }
         return w;
     }