[algo-week I-percolation] Update the main method.