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 = 3000000 + 7;
const int M = 1500 + 7;
const int inf = 1e9 + 7;
const long long linf = 1ll * inf * (inf - 1);
const double pi = acos(-1);
const double eps = 1e-6;
const bool multipleTest = false;
const int mod[2] = {inf, 984723593 + 7};
const int gen[2] = {(rand() % inf) + 1, (rand() % 92473247) + 1};
long long f[2][N];
void init() {
  f[0][0] = f[1][0] = 1;
  for (int i = 1; i < N; ++i) {
    for (int t = 0; t < 2; ++t)
      f[t][i] = (long long)f[t][i - 1] * gen[t] % mod[t];
  }
}
pair<int, int> val[N];
pair<int, int> getNext(pair<int, int> cur, pair<int, int> nxt, int len) {
  int fir = (cur.first * f[0][len] + nxt.first) % mod[0];
  int sec = (cur.second * f[1][len] + nxt.second) % mod[1];
  return make_pair(fir, sec);
}
pair<int, int> getVal(int u, int v) {
  ++u;
  ++v;
  long long fir = (val[v].first - val[u - 1].first * f[0][v - u + 1]) % mod[0];
  if (fir < 0) fir += mod[0];
  long long sec =
      (val[v].second - val[u - 1].second * f[1][v - u + 1]) % mod[1];
  if (sec < 0) sec += mod[1];
  return make_pair(fir, sec);
}
int n, k;
string s;
map<pair<int, int>, int> all;
int ans[N];
set<int> has;
void solve() {
  init();
  cin >> n >> k;
  cin >> s;
  int m;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    string x;
    cin >> x;
    pair<int, int> cur = make_pair(0, 0);
    for (int j = 0, len = (int)(x).size(); j < len; ++j) {
      cur = getNext(cur, make_pair(x[j], x[j] + 2), 1);
    }
    all[cur] = i + 1;
  }
  for (int t = 0; t < k; ++t) s += s[t];
  val[0] = make_pair(0, 0);
  for (int i = 1, len = (int)(s).size(); i <= len; ++i) {
    val[i] = getNext(val[i - 1], make_pair(s[i - 1], s[i - 1] + 2), 1);
  }
  for (int i = 0; i < k; ++i) {
    bool ok = true;
    int t = 0;
    has.clear();
    for (int j = i; t < n; j += k) {
      pair<int, int> cur = getVal(j, j + k - 1);
      if (!all.count(cur) || has.count(all[cur])) {
        ok = false;
        break;
      } else {
        ans[t++] = all[cur];
        has.insert(ans[t - 1]);
      }
    }
    if (ok) {
      puts("YES");
      for (int j = 0; j < n; ++j) {
        printf("%d ", ans[j]);
      }
      return;
    }
  }
  puts("NO");
}
int main() {
  int Test = 1;
  if (multipleTest) {
    cin >> Test;
  }
  for (int i = 0; i < Test; ++i) {
    solve();
  }
}