public static void processInput() throws IOException{
		BufferedReader f = new BufferedReader(new FileReader("input.in"));
		StringTokenizer st = new StringTokenizer(f.readLine());
		Point.m = m = Integer.parseInt(st.nextToken());
		Point.n = n = Integer.parseInt(st.nextToken());
		Point.grid = new Point[Point.m][Point.n];
		regions.add(new Region(0));
		
		//initializes grid, 'X' stands for an obstacle
		for(int i = 0; i < m; ++i){
			String s = f.readLine();
			for(int j = 0; j < n; ++j){
				Point.grid[i][j] = new Point(i, j, s.charAt(j) == 'X');
			}
		}
		
		for(int i = 0; i < m; ++i){
			for(int j = 0; j < n; ++j){
				Point.grid[i][j].getNeighbors();
			}
		}
	}