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.io.*;
import java.util.*;
import java.math.*;
public class work
{
    static int dp[][];
    static int n;
    public static void main(String[] args) throws IOException
    {
        StringBuilder inner = new StringBuilder();
        // HashMap<Integer, Integer> hm = new HashMap<>();
        // ArrayList<Integer> list = new ArrayList<>();
        //Reader s = new Reader();
        FastReader s = new FastReader();
       
            n = s.ni();
            
            int k = s.ni();
            //int m=s.ni();
            TreeSet<Integer> hs = new TreeSet<>();
            ArrayList<pair> arr = new ArrayList<>();
            for(int i = 0;i < n;i++)
            {
                arr.add(new pair(s.ni(), i));
                hs.add(i);
            }
            Collections.sort(arr, new Comparator<pair>()
            {
                public int compare(pair x, pair y)
                {
                    return x.a <= y.a ?  1 : -1;
                }
            });
            int index[] = new int[n];
            Arrays.fill(index, -1);
            int turn = 0;
            for(int j = 0;j<n;j++)
            {
                if(index[arr.get(j).b]!=-1)
                    continue;
                int x = arr.get(j).b;
                hs.remove(x);
                index[x] = turn%2+1;
                int v = x;
                for(int i = 0;i<k;i++)
                {
                    Integer left=hs.lower(v);
                    if(left==null)
                        break;
                    hs.remove(left);
                    v=left;
                    index[left]=turn%2+1;
                    
                }
                v=x;
                for(int i = 0;i<k;i++)
                {
                    Integer right=hs.higher(v);
                    if(right==null)
                        break;
                    hs.remove(right);
                    v=right;
                    index[right]=turn%2+1;
                }
                
                turn++;
            }
            for(int i = 0;i < n;i++)
            {
                inner.append(index[i]);
            }
            print(inner);
    }
    
    /*

    ********if input in hashmap*********

    for (int i = 0; i < n; i++)
    {
        int x = s.nextInt();
        if (!hm.containsKey(x))
            hm.put(x, 1);
        else
            hm.put(x, hm.get(x) + 1);
    }

     */
 /*

    ********if input in 2darray*********

    for (int i = 0; i < n; i++)
    {
        for (int j = 0; j < m; j++)
        {
            arr[i][j] = s.nextInt();
        }
    }

     */
 /*
    
    *********GCD**********

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

     */
 /*

    ***********nCr**********

    static int nCr(int n, int k)
    {
        int ans = 1;
        if ( k > n - k )
            k = n - k;
        for (int i = 0; i < k; ++i)
        {
            ans *= (n - i);
            ans /= (i + 1);
        }
        return res;
    }

     */
 /*
    ******Method to check if x is power of 2********
    
    static boolean isPowerOfTwo (int x)
    {
        return x!=0 && ((x&(x-1)) == 0);
    }
     */
 /*
    *******generate all primes*******
    
    void sieveOfEratosthenes(int n)
    {
        // Create a boolean array "prime[0..n]" and initialize
        // all entries it as true. A value in prime[i] will
        // finally be false if i is Not a prime, else true.
        boolean prime[] = new boolean[n+1];
        for(int i=0;i<n;i++)
            prime[i] = true;

        for(int p = 2; p*p <=n; p++)
        {
            // If prime[p] is not changed, then it is a prime
            if(prime[p] == true)
            {
                // Update all multiples of p
                for(int i = p*2; i <= n; i += p)
                    prime[i] = false;
            }
        }

        // Print all prime numbers
        for(int i = 2; i <= n; i++)
        {
            if(prime[i] == true)
                System.out.print(i + " ");
        }
    }

     */

 /*
    *********permutaion program********

    static boolean shouldSwap(StringBuilder str, int start, int curr)
    {
        for (int i = start; i < curr; i++)
        {
            if (str.charAt(i) == str.charAt(curr))
            {
                return false;
            }
        }
        return true;
    }

    static void findPermutations(StringBuilder str, int index, int n, HashSet<Integer> hs)
    {
        if (index >= n)
        {
            int number = Integer.parseInt(str.toString(), 2);
            hs.add(number);
            return;
        }

        for (int i = index; i < n; i++)
        {

            boolean check = shouldSwap(str, index, i);
            if (check)
            {
                char temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
                findPermutations(str, index + 1, n, hs);
                temp = str.charAt(index);
                str.setCharAt(index, str.charAt(i));
                str.setCharAt(i, temp);
            }
        }
    }
     */
 /*
    ********** island program********

    public static int findisland(int[][]a,int n,int m)
    {
        int count = 0;
        int [][]visited = new int[n][m];
        for (int i = 0; i < n; i++)
        {
            for (int j = 0; j < m; j++)
            {
                if (visited[i][j] == 0 && a[i][j] == 1)
                {
                    count++;
                    island(a, n, m, i, j, visited);
                }
            }

        }
        return count;
    }
    static void island(int [][]a, int n, int m,int i, int j, int[][] visited)
    {
        if (i >= 0 && i < n && j >= 0 && j < m && visited[i][j] == 0 && a[i][j] == 1)
        {
            visited[i][j] = 1;
            for (int k = -1; k <= 1; k++)
            {
                for (int l = -1; l <= 1; l++)
                {
                    if (i+k >= 0 && i+k < n && j+l >= 0 && j+l < m )
                        island(a, n, m, i+k, j+l, visited);
                }
            }
        }
        else
            return;
    }

     */


    static class pair
    {
        int a,b;
        pair(int x, int y)
        {
            a=x;
            b=y;
        }
    }
    static void println(Object line) 
    {
        System.out.println(line);
    }
    static void print(Object line) 
    {
        System.out.print(line);
    }

    static class Reader
    {

        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                {
                    break;
                }
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int ni() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public long nl() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');
            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        public double nd() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
            {
                c = read();
            }
            boolean neg = (c == '-');
            if (neg)
            {
                c = read();
            }

            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
            {
                return -ret;
            }
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
            {
                buffer[0] = -1;
            }
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
            {
                fillBuffer();
            }
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
            {
                return;
            }
            din.close();
        }
    }

    /*recommended*/
    static class FastReader
    {

        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new InputStreamReader(System.in));
        }
        public FastReader(String file_name) throws IOException
        {
            br = new BufferedReader(new FileReader(file_name));
        }
        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int ni()
        {
            return Integer.parseInt(next());
        }

        long nl()
        {
            return Long.parseLong(next());
        }

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

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            } catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }

    }
}