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;
char second[4000111];
pair<long long, long long> func(string second) {
  int n = second.size(), i;
  long long hsh1 = 0LL, hsh2 = 0LL;
  for (i = 0; i < n; i++) {
    hsh1 = (hsh1 * 37LL + second[i] - 'a' + 1) % 1000000007LL;
    hsh2 = (hsh2 * 41LL + second[i] - 'a' + 1) % 1000000009LL;
  }
  return make_pair(hsh1, hsh2);
}
map<pair<long long, long long>, int> my;
int pos[4000111], par[4000111], dp[4000111], co[4000111];
int main() {
  int n, i, j, k, q, l;
  scanf("%d %d", &n, &k);
  cin.ignore();
  gets(second);
  string h = "";
  for (i = 0; i < n * k; i++) h += second[i];
  for (i = 0; i < n * k; i++) h += second[i];
  scanf("%d", &q);
  cin.ignore();
  for (i = 0; i < q; i++) {
    gets(second);
    string h = "";
    for (j = 0; j < k; j++) h += second[j];
    my[func(h)] = i + 1;
  }
  int m = h.size();
  for (i = 0; i <= m; i++) par[i] = -1, dp[i] = 0, co[i] = -1;
  long long hsh1 = 0LL, hsh2 = 0LL;
  for (i = 0; i < k; i++) {
    hsh1 = (hsh1 * 37LL + h[i] - 'a' + 1) % 1000000007LL;
    hsh2 = (hsh2 * 41LL + h[i] - 'a' + 1) % 1000000009LL;
  }
  if (my[make_pair(hsh1, hsh2)]) {
    dp[k - 1] = k;
    par[k - 1] = -1;
    co[k - 1] = my[make_pair(hsh1, hsh2)];
  }
  long long p1 = 1LL, p2 = 1LL;
  for (i = 1; i <= k; i++) {
    p1 = (p1 * 37LL) % 1000000007LL;
    p2 = (p2 * 41LL) % 1000000009LL;
  }
  for (i = k; i < m; i++) {
    hsh1 = (hsh1 * 37LL + h[i] - 'a' + 1) % 1000000007LL;
    hsh2 = (hsh2 * 41LL + h[i] - 'a' + 1) % 1000000009LL;
    hsh1 = (hsh1 - ((h[i - k] - 'a' + 1) * p1)) % 1000000007LL;
    hsh2 = (hsh2 - ((h[i - k] - 'a' + 1) * p2)) % 1000000009LL;
    if (hsh1 < 0) hsh1 += 1000000007LL;
    if (hsh2 < 0) hsh2 += 1000000009LL;
    if (my[make_pair(hsh1, hsh2)]) {
      dp[i] = dp[i - k] + k;
      par[i] = i - k;
      co[i] = my[make_pair(hsh1, hsh2)];
    }
  }
  for (i = 0; i < m; i++) {
    if (dp[i] >= n * k) {
      int c = 0, j = i;
      vector<int> v;
      while (j != -1 && c < n) {
        v.push_back(co[j]);
        j = par[j];
        c++;
      }
      assert(v.size() == n);
      reverse(v.begin(), v.end());
      for (j = 0; j < v.size(); j++) {
        if (pos[v[j]] == 1) break;
        pos[v[j]] = 1;
      }
      if (j != v.size()) continue;
      printf("YES\n");
      for (int i = 0; i < v.size(); i++) printf("%d ", v[i]);
      cout << endl;
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}