public static void BFS(boolean[][] m, Integer b) {
        HashMap<Integer, String> hm = new HashMap<Integer, String>();
        LinkedList<Integer> p = new LinkedList<Integer>();
        HashSet<Integer> hs = new HashSet<Integer>();
        hs.add(b);
        for (int i = 0; i < E; i++) {
            if (m[b][i]) {
                m[b][i] = false;
                hm.put(hm.size(), new String(b + " " + i));
                p.add(i);
                hs.add(i);
            }
        }
        if (p.size() == 0) {
            System.out.println("0");
        } else {
            int M = p.size();
            int D = 1;
            int y = 1;
            while (!p.isEmpty()) {
                y++;
                int n = p.size();
                for (int l = 0; l < n; l++) {
                    int h = p.poll();
                    for (int i = 0; i < E; i++) {
                        if (m[h][i] && !hs.contains(i)) {
                            m[h][i] = false;
                            hm.put(hm.size(), new String(h + " " + i));
                            p.add(i);
                            hs.add(i);
                        }
                    }
                }
                if (p.size() > M) {
                    M = p.size();
                    D = y;
                }
            }
            System.out.println(M + " " + D);
        }
        copy(m, hm);
    }