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 b1 = 443, b2 = 631;
const int mod = 1e9 + 7;
const int maxn = 2e6 + 10;
int pw1[maxn], pw2[maxn];
int h1[maxn], h2[maxn];
inline int ad(int x, int y) {
  x += y;
  if (x < mod) return x;
  return x - mod;
}
inline int mu(int x, int y) { return 1LL * x * y % mod; }
void prep(string s) {
  pw1[0] = pw2[0] = 1;
  for (int i = 0; i + 1 < maxn; i++) {
    pw1[i + 1] = mu(b1, pw1[i]);
    pw2[i + 1] = mu(b2, pw2[i]);
  }
  for (int i = 0; i < s.size(); i++) {
    h1[i + 1] = ad(mu(h1[i], b1), s[i]);
    h2[i + 1] = ad(mu(h2[i], b2), s[i]);
  }
}
inline pair<int, int> gg(int l, int r) {
  int f1 = ad(h1[r], mod - mu(pw1[r - l], h1[l]));
  int f2 = ad(h2[r], mod - mu(pw2[r - l], h2[l]));
  return {f1, f2};
}
inline pair<int, int> ghas(string s) {
  int f1 = 0, f2 = 0;
  for (int i = 0; i < s.size(); i++) {
    f1 = ad(mu(f1, b1), s[i]);
    f2 = ad(mu(f2, b2), s[i]);
  }
  return {f1, f2};
}
map<pair<int, int>, int> mp;
int mark[maxn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, k;
  cin >> n >> k;
  n *= k;
  string s;
  cin >> s;
  s += s;
  prep(s);
  int q;
  cin >> q;
  for (int i = 0; i < q; i++) {
    string t;
    cin >> t;
    pair<int, int> res = ghas(t);
    mp[res] = i + 1;
  }
  for (int i = 0; i < k; i++) {
    int cur = i, can = 1;
    vector<int> ans;
    for (int it = 0; it < n / k; it++) {
      pair<int, int> res = gg(cur, cur + k);
      if (mp[res]) {
        int x = mp[res];
        ans.push_back(x);
        if (mark[x] == i + 1) can = 0;
        mark[x] = i + 1;
      } else
        can = 0;
      cur += k;
    }
    if (can) {
      cout << "YES" << endl;
      for (int j : ans) cout << j << " ";
      cout << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}