private Set<Point> n4(Point p) {
		Set<Point> n4 = new HashSet<Point>();
		if (p.x > 0) {
			n4.add(new Point(p.x - 1, p.y));
		}
		if (p.x < w - 1) {
			n4.add(new Point(p.x + 1, p.y));
		}
		if (p.y > 0) {
			n4.add(new Point(p.x, p.y - 1));
		}
		if (p.y < h - 1) {
			n4.add(new Point(p.x, p.y + 1));
		}
		return n4;
	}