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 N = 2e6 + 5, NN = 2e6 + 5, m = 1e9 + 9, p[] = {31, 53};
char s[N], t[N];
long long pre_hash[N][2], pow_p[N][2], mod_inv_p[N][2];
int n, no, k, gn;
map<pair<long long, long long>, int> pos;
long long compute_hash(char s[], int cnt, int k) {
  long long hash_value = 0;
  long long p_pow = 1;
  int n = strlen(s);
  for (int i = 0; i < n; i++) {
    char c = s[i];
    hash_value = (hash_value + (c - 'a' + 1) * p_pow) % m;
    p_pow = (p_pow * p[k]) % m;
    if (cnt == 0) pre_hash[i][k] = hash_value;
  }
  return hash_value;
}
long long exp(long long b, long long e, long long M) {
  long long ans = 1;
  while (e) {
    if (e & 1) ans = (ans * b) % M;
    b = (b * b) % M;
    e /= 2;
  }
  return ans;
}
void pre_calc(int k) {
  int n = strlen(s);
  long long curr_pow = 1;
  pow_p[0][k] = 1;
  for (int i = 1; i <= n; i++) {
    curr_pow = (curr_pow * p[k]) % m;
    pow_p[i][k] = curr_pow;
  }
  for (int i = 0; i < n + 1; i++) {
    mod_inv_p[i][k] = exp(pow_p[i][k], m - 2, m);
  }
}
long long sub_hash(char s[], int i, int j, int k) {
  long long a = 0, b = pre_hash[j][k];
  if (i != 0) a = pre_hash[i - 1][k];
  long long diff = (b - a + m) % m;
  long long sub_hashvalue = diff * mod_inv_p[i][k];
  return sub_hashvalue % m;
}
set<pair<long long, long long> > cnt[N];
vector<int> v[N];
void solve() {
  for (int i = 0; i < n; i++) {
    int par = i % k;
    long long sh1 = sub_hash(s, i, i + k - 1, 0),
              sh2 = sub_hash(s, i, i + k - 1, 1);
    if (sh1 > sh2) swap(sh1, sh2);
    if (pos.count(make_pair(sh1, sh2))) {
      int sz1 = cnt[par].size();
      cnt[par].insert(make_pair(sh1, sh2));
      int sz2 = cnt[par].size();
      if (sz2 > sz1) v[par].push_back(pos[make_pair(sh1, sh2)]);
    }
    if (cnt[par].size() == no) {
      puts("YES");
      for (int i = 0; i < v[par].size(); i++) printf(" %d", v[par][i]);
      puts("");
      return;
    }
  }
  puts("NO");
}
int main() {
  scanf("%d %d", &no, &k);
  ;
  scanf("%s", t);
  int tlen = strlen(t);
  for (int i = 0; i < tlen; i++) s[i] = t[i];
  for (int i = 0; i < k; i++) s[tlen + i] = t[i];
  n = tlen + k;
  long long hash1 = compute_hash(s, 0, 0), hash11 = compute_hash(s, 0, 1);
  pre_calc(0);
  pre_calc(1);
  scanf("%d", &gn);
  for (int i = 1; i <= gn; i++) {
    char g[NN];
    scanf("%s", g);
    long long hash2 = compute_hash(g, 1, 0), hash22 = compute_hash(g, 1, 1);
    if (hash2 > hash22)
      pos[make_pair(hash22, hash2)] = i;
    else
      pos[make_pair(hash2, hash22)] = i;
  }
  solve();
}