public static void relative_sort(Integer[] v) {
        int firstPositiveIndex = 0;
        for (int i = 0; i < v.length; i++) {
            if(v[i] < 0) {
                if(i != firstPositiveIndex){
                    int negative = v[i];
                    for (int j = i - 1; j >= firstPositiveIndex; j--) {
                        v[j + 1] = v[j];
                    }
                    v[firstPositiveIndex] = negative;
                }
                firstPositiveIndex++;
            }
        }

        for (Integer value : v) {
            System.out.print(value + " ");
        }
    }