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).
// package cf1154;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;

public class CFE {
    private static final String INPUT = "5 1\n" +
            "2 4 5 3 1\n";
    private static final int MOD = 1_000_000_007;

    private PrintWriter out;
    private FastScanner sc;

    public static void main(String[] args) {
        new CFE().run();
    }

    public void run() {
        sc = new FastScanner(oj ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
        out = new PrintWriter(System.out);

        long s = System.currentTimeMillis();
        solve();
        out.flush();
        tr(System.currentTimeMillis() - s + "ms");
    }

    static class Pers implements Comparable<Pers> {
        int val, team;
        Pers prev, next;

        public Pers(int val, Pers prev) {
            this.val = val;
            this.prev = prev;
            if (prev != null) prev.next = this;
        }

        @Override
        public int compareTo(Pers o) {
            return val - o.val;
        }

        @Override
        public String toString() {
            return "Pers{" +
                    "val=" + val +
                    ", team=" + team +
                    '}';
        }
    }
    public void solve() {
        int n = sc.nextInt();
        int k = sc.nextInt();

        Pers[] ans = new Pers[n];
        TreeSet<Pers> set = new TreeSet<>();
        Pers old = null;
        for (int i = 0; i < n; i++) {
            Pers p = new Pers(sc.nextInt(), old);
            ans[i] = p;
            set.add(p);
            old = p;
        }

        int team = 1;
        while(set.size() > 0) {
            Pers left, right;
            Pers pers = left = right = set.last();
            pers.team = team;
            set.remove(pers);

            for (int i = 0; i < k; i++) {
                Pers next = right.next;
                if (next != null) {
                    next.team = team;
                    right = next;
                    set.remove(right);
                } else {
                    break;
                }
            }

            for (int i = 0; i < k; i++) {
                Pers prev = left.prev;
                if (prev != null) {
                    prev.team = team;
                    left = prev;
                    set.remove(left);
                } else {
                    break;
                }
            }

            if (left.prev != null) left.prev.next = right.next;
            if (right.next != null) right.next.prev = left.prev;
            team = 3-team;
        }

        for (Pers an : ans) {
            out.print(an.team);
        }
        out.println();
    }

    //********************************************************************************************
    //********************************************************************************************
    //********************************************************************************************

    /**
     * If searched element doesn't exist, returns index of first element which is bigger than searched value.<br>
     * If searched element is bigger than any array element function returns first index after last element.<br>
     * If searched element is lower than any array element function returns index of first element.<br>
     * If there are many values equals searched value function returns first occurrence.<br>
     */
    private static int lowerBound(long[] arr, long key) {
        int lo = 0;
        int hi = arr.length - 1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (key <= arr[mid]) {
                hi = mid - 1;
            } else {
                lo = mid + 1;
            }
        }
        return arr[lo] < key ? lo + 1 : lo;
    }

    /**
     * Returns index of first element which is grater than searched value.
     * If searched element is bigger than any array element, returns first index after last element.
     */
    private static int upperBound(long[] arr, long key) {
        int lo = 0;
        int hi = arr.length - 1;
        while (lo < hi) {
            int mid = (lo + hi) / 2;
            if (key >= arr[mid]) {
                lo = mid + 1;
            } else {
                hi = mid;
            }
        }
        return arr[lo] <= key ? lo + 1 : lo;
    }

    private static int ceil(double d) {
        int ret = (int) d;
        return ret == d ? ret : ret + 1;
    }

    private static int round(double d) {
        return (int) (d + 0.5);
    }

    private static int gcd(int a, int b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.intValue();
    }

    private static long gcd(long a, long b) {
        BigInteger b1 = BigInteger.valueOf(a);
        BigInteger b2 = BigInteger.valueOf(b);
        BigInteger gcd = b1.gcd(b2);
        return gcd.longValue();
    }

    private int[] readIntArray(int n) {
        int[] res = new int[n];
        for (int i = 0; i < n; i++) {
            res[i] = sc.nextInt();
        }
        return res;
    }

    private long[] readLongArray(int n) {
        long[] res = new long[n];
        for (int i = 0; i < n; i++) {
            res[i] = sc.nextLong();
        }
        return res;
    }

    @SuppressWarnings("unused")
    static class FastScanner {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        FastScanner(InputStream stream) {
            this.stream = stream;
        }

        int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) return -1;
            }
            return buf[curChar++];
        }

        boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        boolean isEndline(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public String next() {
            int c = read();
            while (isSpaceChar(c)) c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }

        public String nextLine() {
            int c = read();
            while (isEndline(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndline(c));
            return res.toString();
        }

    }

    private boolean oj = System.getProperty("ONLINE_JUDGE") != null;

    private void tr(Object... o) {
        if (!oj) System.out.println(Arrays.deepToString(o));
    }
}