Raw implementation of Percolation problem