// Path: src/fdt/utils/Utils.java
// public static void swap(int[] x, int i, int j) {
//     int s = x[i];
//     x[i] = x[j];
//     x[j] = s;
// }


import static fdt.utils.Utils.swap;
import java.util.stream.IntStream;

package fdt.utils;


/**
 *
 * @author Mohammed Jabreel
 */
public class Random extends java.util.Random {

    /**
     *
     */
    public Random() {
    }

    /**
     *
     * @param seed
     */
    public Random(long seed) {
        super(seed);
    }    

    /**
     *
     * @param n
     * @return
     */
    public int[] getPermutation(int n) {
        int[] p = IntStream.range(0, n).toArray();
        permutate(p);
        return p;
    }

    /**
     *
     * @param a
     */
    public void permutate(int[] a) {
        for (int i = 0; i < a.length; i++) {
            int j = i + nextInt(a.length - i);
// Path: src/fdt/utils/Utils.java
// public static void swap(int[] x, int i, int j) {
//     int s = x[i];
//     x[i] = x[j];
//     x[j] = s;
// }


// Path: src/fdt/utils/Random.java
import static fdt.utils.Utils.swap;
import java.util.stream.IntStream;


package fdt.utils;


/**
 *
 * @author Mohammed Jabreel
 */
public class Random extends java.util.Random {

    /**
     *
     */
    public Random() {
    }

    /**
     *
     * @param seed
     */
    public Random(long seed) {
        super(seed);
    }    

    /**
     *
     * @param n
     * @return
     */
    public int[] getPermutation(int n) {
        int[] p = IntStream.range(0, n).toArray();
        permutate(p);
        return p;
    }

    /**
     *
     * @param a
     */
    public void permutate(int[] a) {
        for (int i = 0; i < a.length; i++) {
            int j = i + nextInt(a.length - i);
            swap(a, i, j);