A Java program for Algorythms course on Coursera, week 1 assignment - percolatrion