private static void shuffle(int[] arr, Random gen)
	{
		for (int i = 0 ; i != arr.length ; ++i) {
			int j = gen.nextInt(arr.length - i) + i;
			int t = arr[i];
			arr[i] = arr[j];
			arr[j] = t;
		}
	}