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 MAXN = 3e6 + 10;
char str1[MAXN], str2[MAXN];
const int seed = 13331;
const int mod1 = 1000000007;
const int mod2 = 19260817;
long long xp[2][MAXN], hash_1[2][MAXN], hash_2[2][MAXN];
pair<long long, long long> temp[MAXN];
int ans[MAXN];
void init() {
  xp[0][0] = 1;
  for (int i = 1; i < MAXN; i++) xp[0][i] = (xp[0][i - 1] * 13331) % mod1;
  xp[1][0] = 1;
  for (int i = 1; i < MAXN; i++) xp[1][i] = (xp[1][i - 1] * 1331) % mod2;
}
pair<long long, long long> get_hash(int i, int l, long long hash[][MAXN]) {
  long long a = ((hash[0][i] - hash[0][i + l] * xp[0][l]) % mod1 + mod1) % mod1;
  long long b = ((hash[1][i] - hash[1][i + l] * xp[1][l]) % mod2 + mod2) % mod2;
  return pair<long long, long long>(a, b);
}
pair<long long, long long> make_hash(char str[], long long hash[][MAXN]) {
  int len = strlen(str);
  hash[0][len] = 0;
  hash[1][len] = 0;
  for (int i = len - 1; i >= 0; i--) {
    hash[0][i] = (hash[0][i + 1] * 13331 % mod1 + str[i] - 'a' + 1) % mod1;
    hash[1][i] = (hash[1][i + 1] * 1331 % mod2 + str[i] - 'a' + 1) % mod2;
  }
  return get_hash(0, len, hash);
}
map<pair<long long, long long>, int> mp;
map<pair<long long, long long>, vector<int>> mp2;
int main() {
  int n, k;
  init();
  scanf("%d%d", &n, &k);
  scanf("%s", str1);
  int len = n * k;
  for (int i = len; i < len + len; i++) str1[i] = str1[i - len];
  make_hash(str1, hash_1);
  int g;
  scanf("%d", &g);
  for (int i = 0; i < g; i++) {
    scanf("%s", str2);
    pair<long long, long long> t1 = make_hash(str2, hash_2);
    mp2[t1].push_back(i + 1);
    mp[t1]++;
  }
  for (int i = 0; i < k; i++) {
    int fg = 1;
    int cont = 0;
    int cont1 = 0;
    for (int j = i; j <= i + len - k; j += k) {
      pair<long long, long long> t2 = get_hash(j, k, hash_1);
      if (!mp[t2]) {
        fg = 0;
        break;
      } else {
        temp[cont++] = t2;
        mp[t2]--;
        ans[cont1++] = mp2[t2].back();
        mp2[t2].pop_back();
      }
    }
    if (fg) {
      printf("YES\n");
      for (int j = 0; j < cont1; j++)
        if (!j)
          printf("%d", ans[j]);
        else
          printf(" %d", ans[j]);
      return 0;
    } else {
      for (int j = 0; j < cont; j++) {
        mp[temp[j]]++;
        mp2[temp[j]].push_back(ans[j]);
      }
    }
  }
  printf("NO\n");
  return 0;
}