Problem: Several years ago Tolya had n computer games and at some point of time he decided to burn them to CD. After that he wrote down the names of the games one after another in a circle on the CD in clockwise order. The names were distinct, the length of each name was equal to k. The names didn't overlap.

Thus, there is a cyclic string of length n·k written on the CD.

Several years have passed and now Tolya can't remember which games he burned to his CD. He knows that there were g popular games that days. All of the games he burned were among these g games, and no game was burned more than once.

You have to restore any valid list of games Tolya could burn to the CD several years ago.

Input

The first line of the input contains two positive integers n and k (1 ≤ n ≤ 105, 1 ≤ k ≤ 105) — the amount of games Tolya burned to the CD, and the length of each of the names.

The second line of the input contains one string consisting of lowercase English letters — the string Tolya wrote on the CD, split in arbitrary place. The length of the string is n·k. It is guaranteed that the length is not greater than 106.

The third line of the input contains one positive integer g (n ≤ g ≤ 105) — the amount of popular games that could be written on the CD. It is guaranteed that the total length of names of all popular games is not greater than 2·106.

Each of the next g lines contains a single string — the name of some popular game. Each name consists of lowercase English letters and has length k. It is guaranteed that the names are distinct.

Output

If there is no answer, print "NO" (without quotes).

Otherwise, print two lines. In the first line print "YES" (without quotes). In the second line, print n integers — the games which names were written on the CD. You should print games in the order they could have been written on the CD, it means, in clockwise order. You can print games starting from any position. Remember, that no game was burned to the CD more than once. If there are several possible answers, print any of them.

Examples

Input

3 1
abc
4
b
a
c
d


Output

YES
2 1 3 


Input

4 2
aabbccdd
4
dd
ab
bc
cd


Output

NO

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int maxx = 2000010;
const double pi = acos(-1.0);
const double eps = 1e-15;
map<pair<long long, long long>, long long> h, mk;
map<pair<long long, pair<long long, long long> >, long long> hh;
int t, n, m, k;
long long ans = 0, total = 0, sum = 0, cnt = 0, pos = 0, s1 = 0, s2 = 0, a1 = 0,
          a2 = 0;
long long a[maxx], vis[maxx];
char c[maxx], ch[maxx];
struct nod {
  long long v1, v2;
} kl[maxx];
struct node {
  int num;
  long long val1, val2;
} b[maxx];
bool cmp(node a, node b) {
  if (a.val1 == b.val1) return a.val2 < b.val2;
  return a.val1 < b.val1;
}
int main() {
  scanf("%d%d", &n, &k);
  n = n * k;
  scanf(" %s", c + 1);
  for (int i = n + 1; i <= 2 * n; i++) c[i] = c[i - n];
  scanf("%d", &m);
  a1 = a2 = 1;
  for (int i = 1; i < k; i++)
    a1 = a1 * 237 % 998244353, a2 = a2 * 237 % 1000000007;
  for (int i = 1; i <= m; i++) {
    scanf(" %s", ch + 1);
    s1 = s2 = 0;
    for (int j = 1; j <= k; j++)
      s1 = (s1 * 237 % 998244353 + ch[j] - 'a' + 1) % 998244353,
      s2 = (s2 * 237 % 1000000007 + ch[j] - 'a' + 1) % 1000000007;
    h[make_pair(s1, s2)]++, b[i].val1 = s1, b[i].val2 = s2, b[i].num = i;
  }
  sort(b + 1, b + n + 1, cmp);
  for (int i = 1; i <= n; i++) {
    mk[make_pair(b[i].val1, b[i].val2)] = i;
    for (int j = i; j <= n; j++) {
      if (b[i].val1 != b[j].val1 || b[i].val2 != b[j].val2) {
        i = j - 1;
        break;
      }
      if (j == n) i = n + 1;
    }
  }
  s1 = s2 = 0;
  for (int i = 1; i <= k; i++)
    s1 = (s1 * 237 % 998244353 + c[i] - 'a' + 1) % 998244353,
    s2 = (s2 * 237 % 1000000007 + c[i] - 'a' + 1) % 1000000007;
  kl[1].v1 = s1, kl[1].v2 = s2;
  for (int i = k + 1; i <= 2 * n; i++) {
    s1 = (s1 - a1 * (c[i - k] - 'a' + 1) % 998244353 + 998244353) % 998244353,
    s1 = (s1 * 237 % 998244353 + c[i] - 'a' + 1) % 998244353;
    s2 =
        (s2 - a2 * (c[i - k] - 'a' + 1) % 1000000007 + 1000000007) % 1000000007,
    s2 = (s2 * 237 % 1000000007 + c[i] - 'a' + 1) % 1000000007;
    kl[i - k + 1].v1 = s1, kl[i - k + 1].v2 = s2;
  }
  for (int i = 1; i <= n; i++) {
    int u = i % k;
    if (vis[u]) continue;
    hh[make_pair(u, make_pair(kl[i].v1, kl[i].v2))]++;
    if (hh[make_pair(u, make_pair(kl[i].v1, kl[i].v2))] >
            h[make_pair(kl[i].v1, kl[i].v2)] ||
        !h.count(make_pair(kl[i].v1, kl[i].v2)))
      vis[u] = 1;
  }
  pos = -1;
  for (int i = 0; i < k; i++)
    if (!vis[i]) {
      pos = i;
      break;
    }
  if (pos == -1)
    printf("NO");
  else {
    printf("YES\n");
    if (!pos) pos = k;
    for (int i = pos; i <= n; i += k)
      printf("%d ", b[mk[make_pair(kl[i].v1, kl[i].v2)]++].num);
  }
  return 0;
}