There are n students standing in a row. Two coaches are forming two teams — the first coach chooses the first team and the second coach chooses the second team.

The i-th student has integer programming skill a_i. All programming skills are distinct and between 1 and n, inclusive.

Firstly, the first coach will choose the student with maximum programming skill among all students not taken into any team, and k closest students to the left of him and k closest students to the right of him (if there are less than k students to the left or to the right, all of them will be chosen). All students that are chosen leave the row and join the first team. Secondly, the second coach will make the same move (but all students chosen by him join the second team). Then again the first coach will make such move, and so on. This repeats until the row becomes empty (i. e. the process ends when each student becomes to some team).

Your problem is to determine which students will be taken into the first team and which students will be taken into the second team.

Input

The first line of the input contains two integers n and k (1 ≤ k ≤ n ≤ 2 ⋅ 10^5) — the number of students and the value determining the range of chosen students during each move, respectively.

The second line of the input contains n integers a_1, a_2, ..., a_n (1 ≤ a_i ≤ n), where a_i is the programming skill of the i-th student. It is guaranteed that all programming skills are distinct.

Output

Print a string of n characters; i-th character should be 1 if i-th student joins the first team, or 2 otherwise.

Examples

Input


5 2
2 4 5 3 1


Output


11111


Input


5 1
2 1 3 5 4


Output


22111


Input


7 1
7 2 1 3 5 4 6


Output


1121122


Input


5 1
2 4 5 3 1


Output


21112

Note

In the first example the first coach chooses the student on a position 3, and the row becomes empty (all students join the first team).

In the second example the first coach chooses the student on position 4, and the row becomes [2, 1] (students with programming skills [3, 4, 5] join the first team). Then the second coach chooses the student on position 1, and the row becomes empty (and students with programming skills [1, 2] join the second team).

In the third example the first coach chooses the student on position 1, and the row becomes [1, 3, 5, 4, 6] (students with programming skills [2, 7] join the first team). Then the second coach chooses the student on position 5, and the row becomes [1, 3, 5] (students with programming skills [4, 6] join the second team). Then the first coach chooses the student on position 3, and the row becomes [1] (students with programming skills [3, 5] join the first team). And then the second coach chooses the remaining student (and the student with programming skill 1 joins the second team).

In the fourth example the first coach chooses the student on position 3, and the row becomes [2, 1] (students with programming skills [3, 4, 5] join the first team). Then the second coach chooses the student on position 1, and the row becomes empty (and students with programming skills [1, 2] join the second team).
import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.*;
import java.io.*;



public class Main {

    public static void main(String[] args) throws Exception {
        IO io ;
        try {
            io = new IO("in.in", null);
        } catch (IOException e) {
            io = new IO(null, null);
        }
        int n = io.getNextInt();
        int K = io.getNextInt();
        boolean [] taken = new boolean[n];
        char [] res = new char[n];
        int [] A = new int[n];
        ArrayList<Integer> ord = new ArrayList<>();
        TreeSet<Integer> TS = new TreeSet<>();
        for (int i = 0;i < n;i++){
            A[i] = io.getNextInt();
            ord.add(i);
            TS.add(i);
        }
        Collections.sort(ord, new Comparator<Integer>() {
            @Override
            public int compare(Integer o1, Integer o2) {
                return A[o1] - A[o2];
            }
        });
        Collections.reverse(ord);
        for (int t = 0,i = 0;!TS.isEmpty();t ^= 1) {
            while (taken[ord.get(i)]) i++;
            int u = ord.get(i);
            TS.remove(u);
            taken[u] = true;
            res[u] = "12".charAt(t);
            for (int k = 0;k < K;k++) {
                Integer v = TS.floor(u);
                if (v == null) break;
                TS.remove(v);
                res[v] = "12".charAt(t);
                taken[v] = true;
            }
            for (int k = 0;k < K;k++) {
                Integer v = TS.ceiling(u);
                if (v == null) break;
                TS.remove(v);
                res[v] = "12".charAt(t);
                taken[v] = true;
            }
        }
        io.println(new String(res));
        io.close();
    }
    private static final int onebillion7 = 1000000007;
}


class pair implements Comparable<pair>{
    int k,s;
    public pair(int a,int b) {
        k = a;
        s = b;
    }

    @Override
    public int compareTo(pair o) {
        if (k == o.k) return (s - o.s);
        return -(k - o.k);
    }
}

class IO{
    private BufferedReader br;
    private StringTokenizer st;
    private PrintWriter writer;
    private String inputFile,outputFile;

    public boolean hasMore() throws IOException{
        if(st != null && st.hasMoreTokens()) return true;
        if(br != null && br.ready()) return true;
        return false;
    }

    public String getNext() throws FileNotFoundException, IOException{
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }

    public String getNextLine() throws FileNotFoundException, IOException{
        return br.readLine().trim();
    }

    public int getNextInt() throws FileNotFoundException, IOException{
        return Integer.parseInt(getNext());
    }
    public long getNextLong() throws FileNotFoundException, IOException{
        return Long.parseLong(getNext());
    }

    public void print(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f" ,x);
    }
    public void println(double x,int num_digits) throws  IOException{
        writer.printf("%." + num_digits + "f\n" ,x);
    }
    public void print(Object o) throws  IOException{
        writer.print(o.toString());
    }

    public void println(Object o) throws  IOException{
        writer.println(o.toString());
    }
    public IO(String x,String y) throws FileNotFoundException, IOException{
        inputFile = x;
        outputFile = y;
        if(x != null) br = new BufferedReader(new FileReader(inputFile));
        else br = new BufferedReader(new InputStreamReader(System.in));
        if(y != null) writer = new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));
        else writer = new PrintWriter(new OutputStreamWriter(System.out));
    }

    protected void close() throws IOException{
        br.close();
        writer.close();
    }
    public void outputArr(Object [] A) throws IOException{
        int L = A.length;
        for (int i = 0;i < L;i++) {
            if(i > 0) writer.print(" ");
            writer.print(A[i]);
        }
        writer.print("\n");
    }
}



//class PollardRho {
//    private final static BigInteger ZERO = new BigInteger("0");
//    private final static BigInteger ONE  = new BigInteger("1");
//    private final static BigInteger TWO  = new BigInteger("2");
//    private final static SecureRandom random = new SecureRandom();
//    private static ArrayList<Long> primes = new ArrayList<>();
//
//    private static BigInteger rho(BigInteger N) {
//        BigInteger divisor;
//        BigInteger c  = new BigInteger(N.bitLength(), random);
//        BigInteger x  = new BigInteger(N.bitLength(), random);
//        BigInteger xx = x;
//
//        // check divisibility by 2
//        if (N.base(TWO).compareTo(ZERO) == 0) return TWO;
//
//        do {
//            x  =  x.multiply(x).base(N).add(c).base(N);
//            xx = xx.multiply(xx).base(N).add(c).base(N);
//            xx = xx.multiply(xx).base(N).add(c).base(N);
//            divisor = x.subtract(xx).gcd(N);
//        } while((divisor.compareTo(ONE)) == 0);
//
//        return divisor;
//    }
//
//    private static void factor(BigInteger N) {
//        if (N.compareTo(ONE) == 0) return;
//        if (N.isProbablePrime(20)) {
//            primes.add(N.longValue());
//            return;
//        }
//        BigInteger divisor = rho(N);
//        factor(divisor);
//        factor(N.divide(divisor));
//    }
//
//
//    public static ArrayList<Long> factor(Long n) {
//        primes.clear();
//        factor(BigInteger.valueOf(n));
//        return primes;
//    }
//}

class complex{
    BigDecimal real,imag;
    private static DecimalFormat df = new DecimalFormat("#.###");
    public complex(double x,double y){
        real = new BigDecimal(x);
        imag = new BigDecimal(y);
    }
    public complex(BigDecimal x,BigDecimal y) {
        real = new BigDecimal(x.toString());
        imag = new BigDecimal(y.toString());
    }
    public complex(double t) {
        real = new BigDecimal(Math.cos(t));
        imag = new BigDecimal(Math.sin(t));
    }
    public complex add(complex o){
        return new complex(real.add(o.real),imag.add(o.imag));
    }
    public complex sub(complex o) {
        return new complex(real.subtract(o.real),imag.subtract(o.imag));
    }
    public complex mult(double c) {
        BigDecimal bc = new BigDecimal(c);
        return new complex(real.multiply(bc),imag.multiply(bc));
    }
    public complex mult(complex o) {
        BigDecimal a = real.multiply(o.real).subtract(imag.multiply(o.imag));
        BigDecimal b = real.multiply(o.imag).add(imag.multiply(o.real));
        return new complex(a,b);
    }
    public complex divide(complex o) {
        return this.mult(new complex(o.real,o.imag.negate())).divide(o.norm2());
    }
    public complex divide(double c) {
        BigDecimal bc = new BigDecimal(c);
        return new complex(real.divide(bc),imag.divide(bc));
    }
    public complex divide(BigDecimal bc) {
        return new complex(real.divide(bc),imag.divide(bc));
    }

    public BigDecimal norm2(){
        return real.multiply(real).add(imag.multiply(imag));
    }
    public double norm(){
        return Math.sqrt(norm2().doubleValue());
    }
    @Override
    public String toString(){
        return "(" + df.format(real) + ", " + df.format(imag) + ")";
    }
}

class FFT{
    public static long [] mult(long [] A,long [] B) {
        int n = A.length;
        while (n != (n & -n)) n++;
        n <<= 1;
        complex [] pA = new complex[n];
        complex [] pB = new complex[n];
        complex [] pC = new complex[n];
        for (int i = 0;i < n;i++) {
            if (i < A.length){
                pA[i] = new complex(A[i],0);
                pB[i] = new complex(B[i],0);
            }
            else {
                pA[i] = new complex(0,0);
                pB[i] = new complex(0,0);
            }
        }

        pA = fft(pA,false);
        pB = fft(pB,false);
        for (int i = 0;i < pC.length;i++)
            pC[i] = pA[i].mult(pB[i]);
        pC = fft(pC,true);
        long [] C = new long[n];
        for (int i = 0;i < n;i++) {
            long mod = 1000*1000*1000;
            BigDecimal bc = pC[i].real.remainder(new BigDecimal(mod));
            C[i] %= Math.round(bc.doubleValue());
        }
        return C;
    }
    private static complex[] fft(complex [] f,boolean inv) {
        if (f.length == 1) return f;
        int n = f.length;
        complex wn = new complex((inv ? -1 : 1)*2*Math.PI/n),w = new complex(1,0);
        complex [] E = new complex[n/2],O = new complex[n/2];
        for (int i = 0;i < n;i++){
            if (i%2 == 0) E[i >> 1] = f[i];
            else O[i >> 1] = f[i];
        }
        E = fft(E,inv);
        O = fft(O,inv);
        for (int k = 0;k < n/2;k++){
            f[k] = E[k].add(w.mult(O[k]));
            f[k+n/2] = E[k].sub(w.mult(O[k]));
            w = w.mult(wn);
        }
        return f;
    }
}