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;
bool is_prime(int x) {
  if (x <= 1) {
    return false;
  }
  for (int i = 2; i * i <= x; ++i) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int next_prime(int x) {
  for (int i = x + 1;; ++i) {
    if (is_prime(i)) {
      return i;
    }
  }
}
const int max_n = 101111, max_len = 1000111, inf = 1111111111;
int p1, p2, mod;
int n, k, m, pw1[max_len], h1[max_len];
long long pw2[max_len], h2[max_len];
char a[max_len];
string s;
map<pair<int, long long>, int> q;
set<pair<int, long long> > qq;
pair<int, long long> p[max_n];
pair<int, long long> get(const string &s) {
  int h1 = 0;
  long long h2 = 0;
  for (int i = 0; i < s.length(); ++i) {
    h1 = (1LL * h1 * p1 + s[i] - 'a' + 1) % mod;
    h2 = h2 * p2 + s[i] - 'a' + 1;
  }
  return make_pair(h1, h2);
}
void proc() {
  p1 = next_prime(100 + rand() % 200);
  p2 = next_prime(100 + rand() % 200);
  mod = next_prime(1000000000 + rand() % 10000);
  p1 = 43, p2 = 47;
  mod = 1000000007;
  pw1[0] = 1;
  pw2[0] = 1;
  for (int i = 1; i < max_len; ++i) {
    pw1[i] = (1LL * pw1[i - 1] * p1) % mod;
    pw2[i] = pw2[i - 1] * p2;
  }
  h1[0] = s[0] - 'a' + 1;
  h2[0] = s[0] - 'a' + 1;
  for (int i = 1; i < s.length(); ++i) {
    h1[i] = (1LL * h1[i - 1] * p1 + s[i] - 'a' + 1) % mod;
    h2[i] = h2[i - 1] * p2 + s[i] - 'a' + 1;
  }
}
int get_h1(int l, int r) {
  int x = h1[r], y = 0;
  if (l) {
    y = (1LL * h1[l - 1] * pw1[r - l + 1]) % mod;
  }
  return (x - y + mod) % mod;
}
long long get_h2(int l, int r) {
  if (l == 0) {
    return h2[r];
  }
  return h2[r] - h2[l - 1] * pw2[r - l + 1];
}
int main() {
  srand(time(NULL));
  scanf("%d%d%s", &n, &k, a);
  s = a;
  proc();
  scanf("%d", &m);
  for (int i = 0; i < m; ++i) {
    scanf("%s", a);
    pair<int, long long> p = get(a);
    if (q.count(p)) {
      return 228;
    }
    q[p] = i;
  }
  for (int i = 0; i < k; ++i) {
    int f = 1;
    qq.clear();
    for (int j = 0; j < n; ++j) {
      int l = i + k * j, r = i + k * (j + 1) - 1;
      if (j + 1 < n || i == 0) {
        p[j].first = get_h1(l, r);
        p[j].second = get_h2(l, r);
      } else {
        p[j].first =
            (1LL * get_h1(l, s.length() - 1) * pw1[i] + h1[i - 1]) % mod;
        p[j].second = get_h2(l, s.length() - 1) * pw2[i] + h2[i - 1];
      }
      if (!q.count(p[j])) {
        f = 0;
        break;
      }
      if (qq.count(p[j])) {
        f = 0;
        break;
      }
      qq.insert(p[j]);
    }
    if (f) {
      printf("YES\n");
      for (int i = 0; i < n; ++i) {
        printf("%d ", 1 + q[p[i]]);
      }
      printf("\n");
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}