#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using datas = pair<ll, ll>;
using tdata = pair<datas, ll>;
long mmid(long a, long b, long c) {
  return a < b ? (b < c ? b : max(a, c)) : (b > c ? b : min(a, c));
}
ll modinv(ll a) {
  ll b = 1000000007, u = 1, v = 0, t;
  while (b) {
    t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  return (u + 1000000007) % 1000000007;
}
ll moddevide(ll a, ll b) { return (a * modinv(b)) % 1000000007; }
ll modncr(ll n, ll r) {
  ll i, plus = 1;
  for (i = 0; i < r; i++) {
    plus = (plus * (n - i)) % 1000000007;
    plus = moddevide(plus, i + 1);
  }
  return plus;
}
ll modncrlistp[200000], modncrlistm[200000];
ll modncrs(ll n, ll r) {
  ll i, j;
  if (modncrlistp[n] == 0) {
    for (i = n; i >= 0; i--) {
      if (modncrlistp[i]) break;
    }
    if (i < 0) {
      modncrlistp[0] = 1;
      for (i = 1; i < n + 1; i++) {
        modncrlistp[i] = (modncrlistp[i - 1] * i) % 1000000007;
      }
    } else {
      for (j = i + 1; j < n + 1; j++) {
        modncrlistp[j] = (modncrlistp[j - 1] * j) % 1000000007;
      }
    }
  }
  if (modncrlistm[n] == 0) {
    for (i = n; i >= 0; i--) {
      if (modncrlistm[i]) break;
    }
    if (i < 0) {
      modncrlistm[0] = 1;
      for (i = 1; i < n + 1; i++) {
        modncrlistm[i] = (modncrlistm[i - 1] * modinv(i)) % 1000000007;
      }
    } else {
      for (j = i + 1; j < n + 1; j++)
        modncrlistm[j] = (modncrlistm[j - 1] * modinv(j)) % 1000000007;
    }
  }
  return (((modncrlistp[n] * modncrlistm[r]) % 1000000007) *
          modncrlistm[n - r]) %
         1000000007;
}
ll euclidean_gcd(ll a, ll b) {
  if (a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
ll countdigits(ll n) {
  ll ans = 0;
  while (n) {
    n /= 10;
    ans++;
  }
  return ans;
}
ll sumdigits(ll n) {
  ll ans = 0;
  while (n) {
    ans += n % 10;
    n /= 10;
  }
  return ans;
}
void printmap(vector<ll>& a, ll H, ll W) {
  ll i, j;
  for (i = 0; i < H + 2; i++) {
    for (j = 0; j < W + 2; j++) {
      cout << a[i * (W + 2) + j];
    }
    cout << endl;
  }
}
void inputmap(vector<ll>& a, ll H, ll W) {
  ll i, j;
  string ss;
  for (i = 1; i < H + 1; i++) {
    cin >> ss;
    for (j = 1; j < W + 1; j++) {
      if (ss[j - 1] == '#') {
        a[i * (W + 2) + j] = 1;
      } else {
        a[i * (W + 2) + j] = 0;
      }
    }
  }
}
int main() {
  ll i, x, N, K, now = 0, cnt = 0;
  cin >> N >> K;
  string str = "a";
  vec v(N), ans(N, 0), ch(N, 0);
  for (i = 0; i < N; i++) cin >> v[i];
  for (i = 0; i < N; i++) {
    cin >> x;
    if (ch[x - 1] == 0) {
      while (v[now] != x) {
        ch[v[now] - 1] = 1;
        now++;
      }
    }
    ans[x - 1] = cnt;
    if (now == i) cnt++;
  }
  if (cnt < K) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (i = 0; i < N; i++) {
      x = min(ans[i], (ll)25);
      str[0] = 'a' + x;
      cout << str[0];
    }
    cout << endl;
  }
  return 0;
}

### Prompt

Develop a solution in Cpp to the problem described below:

Authors have come up with the string s consisting of n lowercase Latin letters.

You are given two permutations of its indices (not necessary equal) p and q (both of length n). Recall that the permutation is the array of length n which contains each integer from 1 to n exactly once.

For all i from 1 to n-1 the following properties hold: s[p_i] ≤ s[p_{i + 1}] and s[q_i] ≤ s[q_{i + 1}]. It means that if you will write down all characters of s in order of permutation indices, the resulting string will be sorted in the non-decreasing order.

Your task is to restore any such string s of length n consisting of at least k distinct lowercase Latin letters which suits the given permutations.

If there are multiple answers, you can print any of them.

Input

The first line of the input contains two integers n and k (1 ≤ n ≤ 2 ⋅ 10^5, 1 ≤ k ≤ 26) — the length of the string and the number of distinct characters required.

The second line of the input contains n integers p_1, p_2, ..., p_n (1 ≤ p_i ≤ n, all p_i are distinct integers from 1 to n) — the permutation p.

The third line of the input contains n integers q_1, q_2, ..., q_n (1 ≤ q_i ≤ n, all q_i are distinct integers from 1 to n) — the permutation q.

Output

If it is impossible to find the suitable string, print "NO" on the first line.

Otherwise print "YES" on the first line and string s on the second line. It should consist of n lowercase Latin letters, contain at least k distinct characters and suit the given permutations.

If there are multiple answers, you can print any of them.

Example

Input


3 2
1 2 3
1 3 2


Output


YES
abb

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vec = vector<ll>;
using mat = vector<vec>;
using datas = pair<ll, ll>;
using tdata = pair<datas, ll>;
long mmid(long a, long b, long c) {
  return a < b ? (b < c ? b : max(a, c)) : (b > c ? b : min(a, c));
}
ll modinv(ll a) {
  ll b = 1000000007, u = 1, v = 0, t;
  while (b) {
    t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  return (u + 1000000007) % 1000000007;
}
ll moddevide(ll a, ll b) { return (a * modinv(b)) % 1000000007; }
ll modncr(ll n, ll r) {
  ll i, plus = 1;
  for (i = 0; i < r; i++) {
    plus = (plus * (n - i)) % 1000000007;
    plus = moddevide(plus, i + 1);
  }
  return plus;
}
ll modncrlistp[200000], modncrlistm[200000];
ll modncrs(ll n, ll r) {
  ll i, j;
  if (modncrlistp[n] == 0) {
    for (i = n; i >= 0; i--) {
      if (modncrlistp[i]) break;
    }
    if (i < 0) {
      modncrlistp[0] = 1;
      for (i = 1; i < n + 1; i++) {
        modncrlistp[i] = (modncrlistp[i - 1] * i) % 1000000007;
      }
    } else {
      for (j = i + 1; j < n + 1; j++) {
        modncrlistp[j] = (modncrlistp[j - 1] * j) % 1000000007;
      }
    }
  }
  if (modncrlistm[n] == 0) {
    for (i = n; i >= 0; i--) {
      if (modncrlistm[i]) break;
    }
    if (i < 0) {
      modncrlistm[0] = 1;
      for (i = 1; i < n + 1; i++) {
        modncrlistm[i] = (modncrlistm[i - 1] * modinv(i)) % 1000000007;
      }
    } else {
      for (j = i + 1; j < n + 1; j++)
        modncrlistm[j] = (modncrlistm[j - 1] * modinv(j)) % 1000000007;
    }
  }
  return (((modncrlistp[n] * modncrlistm[r]) % 1000000007) *
          modncrlistm[n - r]) %
         1000000007;
}
ll euclidean_gcd(ll a, ll b) {
  if (a < b) return euclidean_gcd(b, a);
  ll r;
  while ((r = a % b)) {
    a = b;
    b = r;
  }
  return b;
}
ll countdigits(ll n) {
  ll ans = 0;
  while (n) {
    n /= 10;
    ans++;
  }
  return ans;
}
ll sumdigits(ll n) {
  ll ans = 0;
  while (n) {
    ans += n % 10;
    n /= 10;
  }
  return ans;
}
void printmap(vector<ll>& a, ll H, ll W) {
  ll i, j;
  for (i = 0; i < H + 2; i++) {
    for (j = 0; j < W + 2; j++) {
      cout << a[i * (W + 2) + j];
    }
    cout << endl;
  }
}
void inputmap(vector<ll>& a, ll H, ll W) {
  ll i, j;
  string ss;
  for (i = 1; i < H + 1; i++) {
    cin >> ss;
    for (j = 1; j < W + 1; j++) {
      if (ss[j - 1] == '#') {
        a[i * (W + 2) + j] = 1;
      } else {
        a[i * (W + 2) + j] = 0;
      }
    }
  }
}
int main() {
  ll i, x, N, K, now = 0, cnt = 0;
  cin >> N >> K;
  string str = "a";
  vec v(N), ans(N, 0), ch(N, 0);
  for (i = 0; i < N; i++) cin >> v[i];
  for (i = 0; i < N; i++) {
    cin >> x;
    if (ch[x - 1] == 0) {
      while (v[now] != x) {
        ch[v[now] - 1] = 1;
        now++;
      }
    }
    ans[x - 1] = cnt;
    if (now == i) cnt++;
  }
  if (cnt < K) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (i = 0; i < N; i++) {
      x = min(ans[i], (ll)25);
      str[0] = 'a' + x;
      cout << str[0];
    }
    cout << endl;
  }
  return 0;
}

```