Percolation programming assignment