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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author sumit
 */
public class Main {
      public static void main(String[] args) {
            InputStream inputStream = System.in;
            OutputStream outputStream = System.out;
            InputReader in = new InputReader(inputStream);
            OutputWriter out = new OutputWriter(outputStream);
            ETwoTeams solver = new ETwoTeams();
            solver.solve(1, in, out);
            out.close();
      }

      static class ETwoTeams {
            Node[] ii;
            Node end;

            Node add(Node head, int val, int index) {
                  if (head == null) {
                        head = new Node(val, index);
                        end = head;
                        ii[index] = head;
                        return head;
                  }
                  Node temp = end;

                  Node aa = new Node(val, index);
                  end = aa;
                  ii[index] = aa;
                  temp.next = aa;
                  aa.prev = temp;
                  return head;
            }

            public void solve(int testNumber, InputReader in, OutputWriter out) {
                  int n = in.nextInt();
                  int k = in.nextInt();
                  int arr[] = in.nextIntArray(n);
                  Node head = null;
                  Node end = null;
                  Pair[] aa = new Pair[n];
                  ii = new Node[n];
                  for (int i = 0; i < n; i++) {
                        head = add(head, arr[i], i);
                        aa[i] = new Pair(arr[i], i);
                  }

                  int[] ans = new int[n];
                  Arrays.fill(ans, -1);


                  SegmentTree tree = new SegmentTree(n, aa);
                  int xor = 0;
                  while (true) {
                        int ind = tree.Query().index;
                        if (tree.Query().val == -1) {

                              break;
                        }
                        Node mm = ii[ind];
                        int c1 = k;
                        Node t1 = mm;
                        while (c1 >= 0 && t1 != null) {
                              tree.update(t1.index, t1.index, 0);
                              ans[t1.index] = xor;
                              t1 = t1.prev;
                              c1--;
                        }
                        Node t2 = mm.next;
                        c1 = k;
                        while (c1 > 0 && t2 != null) {
                              tree.update(t2.index, t2.index, 0);
                              ans[t2.index] = xor;
                              t2 = t2.next;
                              c1--;
                        }
                        if (t1 != null && t2 != null) {
                              t1.next = t2;
                              t2.prev = t1;
                        } else if (t1 == null && t2 != null) {
                              t2.prev = t1;
                              head = t2;
                        } else if (t1 != null && t2 == null) {
                              t1.next = t2;
                        } else {
                              break;
                        }
                        xor = xor ^ 1;
                  }
                  for (int i = 0; i < n; i++)
                        out.print((ans[i] + 1));


            }

            class Pair implements Comparable<Pair> {
                  int val;
                  int index;

                  Pair(int val, int index) {
                        this.val = val;
                        this.index = index;
                  }

                  public int compareTo(Pair pair) {
                        return Integer.compare(this.val, pair.val);
                  }

            }

            class SegmentTree {
                  Pair[] seg;
                  int size;
                  int nn;
                  int StartIndex = 0;
                  int EndIndex;

                  SegmentTree(int n, Pair[] arr) {
                        int temp = (int) Math.ceil((Math.log(n) / Math.log(2)));
                        nn = (int) Math.pow(2, temp);
                        EndIndex = nn - 1;
                        this.size = 2 * nn - 1;
                        seg = new Pair[size];
                        for (int i = 0; i < nn; i++) {
                              if (i < n)
                                    this.seg[i + nn - 1] = arr[i];
                              else
                                    this.seg[i + nn - 1] = new Pair(-1, -1);
                        }
                        for (int i = nn - 2; i >= 0; i--)
                              if (seg[2 * i + 1].val > seg[2 * i + 2].val) {
                                    seg[i] = new Pair(seg[2 * i + 1].val, seg[2 * i + 1].index);
                              } else {
                                    seg[i] = new Pair(seg[2 * i + 2].val, seg[2 * i + 2].index);
                              }
                  }

                  Pair Query() {
                        return seg[0];
                  }

                  void update(int us, int ue, int i) {
                        update(StartIndex, EndIndex, us, ue, i);
                  }

                  void update(int ss, int se, int us, int ue, int i) {
                        int mid = (ss + se) / 2;
                        if (ue < ss || us > se || ss > se)
                              return;
                        if (ss == se) {
                              seg[ss + nn - 1].val = -1;
                              return;
                        }
                        update(ss, mid, us, ue, 2 * i + 1);
                        update(mid + 1, se, us, ue, 2 * i + 2);
                        if (seg[2 * i + 1].val > seg[2 * i + 2].val) {
                              seg[i].val = seg[2 * i + 1].val;
                              seg[i].index = seg[2 * i + 1].index;
                        } else {
                              seg[i].val = seg[2 * i + 2].val;
                              seg[i].index = seg[2 * i + 2].index;
                        }
                  }

            }

            class Node {
                  Node next;
                  Node prev;
                  int index;
                  int val;

                  Node(int val, int index) {
                        next = null;
                        prev = null;
                        this.val = val;
                        this.index = index;
                  }

            }

      }

      static class OutputWriter {
            private final PrintWriter writer;

            public OutputWriter(OutputStream outputStream) {
                  writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
            }

            public OutputWriter(Writer writer) {
                  this.writer = new PrintWriter(writer);
            }

            public void close() {
                  writer.close();
            }

            public void print(int i) {
                  writer.print(i);
            }

      }

      static class InputReader {
            private InputStream stream;
            private byte[] buf = new byte[1024];
            private int curChar;
            private int numChars;

            public InputReader(InputStream stream) {
                  this.stream = stream;
            }

            public 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++];
            }

            public int nextInt() {
                  int c = read();

                  while (isSpaceChar(c))
                        c = read();

                  int sgn = 1;

                  if (c == '-') {
                        sgn = -1;
                        c = read();
                  }

                  int res = 0;

                  do {
                        if (c < '0' || c > '9')
                              throw new InputMismatchException();

                        res *= 10;
                        res += c & 15;

                        c = read();
                  } while (!isSpaceChar(c));

                  return res * sgn;
            }

            public int[] nextIntArray(int arraySize) {
                  int array[] = new int[arraySize];

                  for (int i = 0; i < arraySize; i++)
                        array[i] = nextInt();

                  return array;
            }

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

      }
}

