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).
#include <bits/stdc++.h>
using namespace std;
long long n, a[200005], pre[200005], nxt[200005], pos[200005], mark[200005],
    ans[200005], k, tmp = 2;
vector<long long> v;
void input() {
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    pos[a[i]] = i;
  }
}
void output() {}
void solve() {
  for (long long i = 1; i <= n; i++) v.push_back(i);
  nxt[n] = 4444444444444444444;
  pre[1] = -1;
  for (long long i = 1; i < n; i++) nxt[i] = i + 1;
  for (long long i = 2; i <= n; i++) pre[i] = i - 1;
  while (!v.empty()) {
    long long l, r, k1 = 0, k2 = 0;
    long long q = v.back();
    v.pop_back();
    tmp = 3 - tmp;
    for (long long i = pos[q]; i <= n; i = nxt[i]) {
      k1++;
      mark[a[i]] = 1;
      ans[i] = tmp;
      if (nxt[i] == 4444444444444444444) {
        r = i;
        break;
      }
      if (k1 == k + 1) {
        r = i;
        break;
      }
    }
    for (long long i = pos[q]; i >= 1; i = pre[i]) {
      k2++;
      mark[a[i]] = 1;
      ans[i] = tmp;
      if (pre[i] == -1) {
        l = i;
        break;
      }
      if (k2 == k + 1) {
        l = i;
        break;
      }
    }
    if (pre[l] != -1) nxt[pre[l]] = nxt[r];
    if (nxt[r] != 4444444444444444444) pre[nxt[r]] = pre[l];
    while (!v.empty() && mark[v.back()] == 1) v.pop_back();
  }
  for (long long i = 1; i <= n; i++) cout << ans[i];
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  input();
  solve();
  output();
}
