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 cf;
import java.io.*;
import java.util.*;
import java.util.jar.JarOutputStream;

public class T_class {
    static int p=1000000007;
    static int max=(int)1e5;
    static List<Integer> l1=new ArrayList<>();
    static boolean prime[]=new boolean[max];
    static long fact[]=new long[3_000_00];
    static class  pr_int
    {
        int first;
        int second;
        public pr_int(int first, int second) {
            this.first = first;
            this.second = second;
        }
    }
    static  long anss=0;
    public static void main(String[] args) throws Exception {
        BufferedWriter out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(java.io.FileDescriptor.out), "ASCII"), 512);
        FastReader sc = new FastReader();
        int t =1;//sc.nextInt();//sc.nextInt();
        StringBuilder sb2 = new StringBuilder();
        int t2 = t;
        while (t-- > 0) {
            int n=sc.nextInt();
            int k=sc.nextInt();
            int ar[]=new int[n];
            TreeMap<Integer,Integer> score=new TreeMap<>();
            TreeSet<Integer> set=new TreeSet<>();
            for(int i=0;i<n;i++)
            {
                ar[i]=sc.nextInt();
                score.put(ar[i],i);
                set.add(i);
            }
            int f=0;
            while (score.size()>0)
            {
                Integer cur=score.lastKey();
                Integer ind=score.get(cur);
                ar[ind]=f;

                set.remove(ind);
                score.remove(cur);
                int c=0;
                cur=ind;
                Integer nxt;
                while (c<k&&set.higher(cur)!=null)
                {
                    c++;
                    nxt=set.higher(cur);
                    set.remove(nxt);
                    score.remove(ar[nxt]);
                    ar[nxt]=f;
                }
                c=0;
                while (c<k&&set.lower(cur)!=null)
                {
                    c++;
                    nxt=set.lower(cur);
                    set.remove(nxt);
                    score.remove(ar[nxt]);
                    ar[nxt]=f;
                }
                f=1-f;
            }
            for(int i:ar)
            {
                System.out.print(i==0?1:2);
            }
        }
        System.out.println(sb2.toString());
        out.flush();

    }

    private static void addto(PriorityQueue<pr_int> p1, PriorityQueue<pr_int> p2, pr_int cur1) {
        if(cur1.second==0)
            return;
        if(cur1.second>=2)
        p2.add(cur1);
    else
        p1.add(cur1);
    }

    public static  boolean isp(int n)
    {
        if(n==2||n==3||n==5||n==7||n==11||n==13||n==17)
        {
            return true;
        }
        return false;
    }
    private static String move(int[] i, String cur) {
        char ar[]=cur.toCharArray();
        //  System.out.println(cur);
        int sum=(ar[i[0]]-'0')+(ar[i[1]]-'0');
        if(isp(sum))
        {
            char t=ar[i[0]];
            ar[i[0]]=ar[i[1]];
            ar[i[1]]=t;
        }
        //System.out.println(String.valueOf(ar));
        return String.valueOf(ar);
    }

    static long lcm(long a,long b)
    {
        return  a*b/gcd(a,b);
    }
    static boolean done=false;
    static long ret;
    public  static long tolong(char ar[])
    {
        long ans=0;
        for(char i:ar)
            ans=ans*10+ (i-'0');

        return ans;
    }
    public  static  void recur(char ar[],int n,int cur,long lcm,boolean con)
    {
        if(cur==n)
        {
            System.out.println(tolong(ar)+" "+lcm);
            done=tolong(ar)%lcm==0;
            if(done)
                ret=tolong(ar);
            return;
        }
        int lst=ar[cur]-'0';
        for(int i=con?ar[cur]-'0':0;i<=9;i++)
        {
            char prev=ar[cur];
            ar[cur]=(char) (i+'0');
            recur(ar, n, cur + 1, i==0?lcm:lcm(i,lcm),lst==i);
            ar[cur]=prev;
            if(done)
                return ;
        }
    }
    static long ansa(long l,long r,long s,long ss,int n,int ar[])
    {

        while(l<=r)
        {
            long mid=(l+r)/2;
            long tot=0;
            for(int i=0;i<n;i++)
            {
                tot+=Math.abs(ar[i]-mid);
            }

            if(tot*2<=s)
            {
                // System.out.println(s+" - "+(mid*n)+" <= "+ss);
                return mid;
            }
            else if(tot*2>s)
            {
                r=mid-1;
            }
            else
            {
                l=mid+1;
            }
        }
        return 1;
    }
    static void ruffle_sort(long[] a) {
        //shandom_ruffle
        Random r=new Random();
        int n=a.length;
        for (int i=0; i<n; i++) {
            int oi=Math.abs(r.nextInt(i+1));
            long temp=a[i];
            a[i]=a[oi];
            a[oi]=temp;
        }

        //sort
        Arrays.sort(a);
    }
    static void ruffle_sort(int[] a) {
        //shandom_ruffle
        Random r=new Random();
        int n=a.length;
        for (int i=0; i<n; i++) {
            int oi=Math.abs(r.nextInt(i+1));
            int temp=a[i];
            a[i]=a[oi];
            a[oi]=temp;
        }

        //sort
        Arrays.sort(a);
    }
    static long mod=(long) 1e9+7;
    private static long nC2(long n) {
        return n*(n-1)/2;
    }
    static long mul(long a, long b) {
        return a*b%mod;
    }

    static long add(long a, long b) {
        return (a+b)%mod;
    }
    static void precomp() {
        fact[0]=1;
        for (int i=1; i<fact.length; i++) fact[i]=mul(fact[i-1], i);
    }
    static long modInv(long x) {
        return pow(x, mod-2,mod);
    }
    static long nCk(int n, int k) {
        return mul(fact[n], mul(modInv(fact[k]), modInv(fact[n-k])));
    }


    private static List<Long> getdivisors(long n) {
        List<Long> l1=new ArrayList<>();
        for(long i=1;i<=Math.sqrt(n);i++)
        {
            if(n%i==0){
                l1.add(i);
                if(n/i!=i)
                    l1.add(n/i);
            }
        }
        // System.out.println(l1);
        Collections.sort(l1);
        return l1;
    }

    private static int count(int k, int l, String cur) {
        char ar[]=cur.toCharArray();
        int c=0;
        for(int i=k;i<=l;i++)
        {
            if(i=='1')
                c++;
        }
        return c;
    }

    private static String revese(String substring) {
        StringBuilder sb=new StringBuilder();
        sb.append(substring);
        sb=sb.reverse();
        return sb.toString();
    }


    static  int ht[]=new int[max];
    static class BIT {
        long[] tree;
        public BIT(int size) {
            tree = new long[size + 1];
        }
        public long sum(int i) {
            long ans = 0;
            while (i > 0) {
                ans += tree[i];
                i -= i & -i;
            }
            return ans;
        }

        public long query(int i, int j) {
            return sum(j) - sum(i - 1);
        }

        public void add(int i, long val) {
            while (i < tree.length) {
                tree[i] += val;
                i += i & -i;
            }
        }

        public void set(int i, long val) {
            add(i, val - query(i, i));
        }
    }
    public static long pow(long a,long b,long m)
    {
        long r=1;
        while(b!=1)
        {
            if(b%2!=0)
                r=(r*a)%m;
            b=b>>1;
            a=(a*a)%m;
        }
        return (r*a)%m;
    }
    public static long gcd(long a,long b)
    {
        if(b>a)
        {
            a=a^b;
            b=a^b;
            a=a^b;
        }
        if(b==0)
            return a;
        return gcd(b,a%b);
    }
    public static void extgcd(long a,long b)
    {/*
            if(a==0)
            {
                x=0;
                y=1;
                d=b;
                // return ;
            }
            else
            {

                extgcd(b%a,a);

                long t=y;
                y=x;
                x=t-(b/a)*x;
            }*/
    }
    static  Set<Integer > used=new HashSet<>();
    public static void dfs(List<Integer>[] adj, int u, int p, boolean[] vis,long ind[],long n)
    {
        // anss-=((ind[u]-1)*(ind[u]-2))/2>0&&!used.contains(u)?((ind[u]-1)*(ind[u]-2))/2:0;

        if(((ind[u]-1)*(ind[u]-2))/2>0)
        {
            //   System.out.println(u+" -- "+((ind[u]-1)*(ind[u]))/2);
            //   used.add(u);
        }
        vis[u]=true;
        int c=0;
        for(int v:adj[u])
        {
            if(v!=p&&vis[v])
            {
                //   System.out.println(u+" c--c"+v+" "+((ind[v]-1)*(ind[v]))/2);
                if(((ind[v]-1)*(ind[v]-2))/2>0) {
                    anss -= ((ind[v] - 1) * (ind[v] - 2)) / 2 > 0 && !used.contains(v) ? ((ind[v] - 1) * (ind[v] - 2)) / 2 : 0;
                    used.add(v);
                }
                if(((ind[u]-1)*(ind[u]-2))/2>0) {
                    anss -= ((ind[u] - 1) * (ind[u] - 2)) / 2 > 0 && !used.contains(u) ? ((ind[u] - 1) * (ind[u] - 2)) / 2 : 0;
                    used.add(u);
                }
                continue;
            }
            if(!vis[v])
            {
                c++;
                dfs(adj,v,u, vis,ind,n+1);
            }
        }
        if(c==0)
        {
            anss+=(n)*(n+1l)/2;
        }
        vis[u]=false;
    }
    public static void seive()
    {
        for(int i=0;i<max;i++)
            prime[i] = true;

        for(int p = 2; p*p <=max; 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*p; i <=max; i += p)
                    prime[i] = false;
            }
        }

        // Print all prime numbers
        for(int i = 2; i <= max; i++)
        {
            if(prime[i] == true)
            {
                l1.add(i);
            }
        }
    }
    public static boolean union(int a, int b, int p[], int r[]){
        // add your code here
        int pa=find(a,p,r);
        int pb=find(b,p,r);
        if(pa==pb)
            return true;
        if(pa!=pb)
        {
            if(r[pa]<r[pb])
            {
                p[pa]=pb;
            }
            else if(r[pa]>r[pb])
            {
                p[pb]=pa;
            }
            else
            {
                p[pa]=pb;
                r[pb]++;
            }
        }
        return false;
    }
    public static int find(int x,int p[],int r[])
    {
        if(p[x]==x)
            return x;
        p[x]=find(p[x],p,r);
        return p[x];
    }
    public static int binary_Search_upper(int[] ar,int l, int x)
    {
        int res=-1;
        int r=ar.length-1;
        while(l<=r)
        {
            int mid=(l+r)>>1;
            if(ar[mid]<=x)
            {
                res=mid;
                l=mid+1;
            }
            else if(ar[mid]>x)
            {
                //res=mid;
                r=mid-1;
            }
        }
        return res;
    }
    public static int binary_Search_lower(int[] ar, int x)
    {
        int res=ar.length;
        int l=0;int r=ar.length-1;
        while(l<=r)
        {
            int mid=(l+r)>>1;
            if(ar[mid]>=x)
            {
                res=mid;
                r=mid-1;
            }
            else
            {
                l=mid+1;
            }
        }
        return res;
    }
    int bit[]=new int[(int)1e6];
    public void update(int n,int val,int i)
    {
        i++;
        while(i<n)
        {
            bit[i]+=val;
            i+=(i)&(-i);
        }

    }
    public long query(int n,int i)
    {
        i++;
        long sum=0;
        while(i>0)
        {
            sum+=bit[i];
            i-=(i)&(-i);
        }
        return sum;
    }


    ///////////////////////////////////////////////////////////////////////////////////
    //////////////////////////////////////////////////////////////////////////////////////////////
    static class FastReader {

        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            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;
        }
    }


}
