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 long long P1 = 31;
const long long P2 = 37;
const long long MOD1 = ((1e9) + 7);
const long long MOD2 = ((1e9) + 9);
long long pws1[2100000];
long long pws2[2100000];
long long pw1(long long x, int n) {
  if (n == 0) return 1;
  if (n & 1) return 1ll * pw1(x, n - 1) * x % MOD1;
  long long b = pw1(x, n >> 1);
  return b * b % MOD1;
}
long long pw2(long long x, int n) {
  if (n == 0) return 1;
  if (n & 1) return 1ll * pw2(x, n - 1) * x % MOD2;
  long long b = pw2(x, n >> 1);
  return b * b % MOD2;
}
long long getHash1(const string& s) {
  long long hash = 0;
  for (int i = 0; i < s.size(); ++i) {
    hash += (1ll * (s[i]) * pws1[i]) % MOD1;
    hash %= MOD1;
  }
  return hash;
}
long long getHash2(const string& s) {
  long long hash = 0;
  for (int i = 0; i < s.size(); ++i) {
    hash += (1ll * (s[i]) * pws2[i]) % MOD2;
    hash %= MOD2;
  }
  return hash;
}
long long hashes1[2100000];
long long hashes2[2100000];
long long getPodHash1(int l, int r) {
  long long h = hashes1[r - 1];
  if (l) h -= hashes1[l - 1];
  if (h < 0) h += MOD1;
  h *= pw1(P1, MOD1 - 1 - l);
  return h % MOD1;
}
long long getPodHash2(int l, int r) {
  long long h = hashes2[r - 1];
  if (l) h -= hashes2[l - 1];
  if (h < 0) h += MOD2;
  h *= pw2(P2, MOD2 - 1 - l);
  return h % MOD2;
}
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int g;
  cin >> g;
  pws1[0] = 1;
  pws2[0] = 1;
  for (int i = 1; i < n * k + k; ++i) pws1[i] = (1ll * pws1[i - 1] * P1) % MOD1;
  for (int i = 1; i < n * k + k; ++i) pws2[i] = (1ll * pws2[i - 1] * P2) % MOD2;
  map<pair<long long, long long>, int> st;
  s += s.substr(0, k);
  hashes1[0] = s[0];
  hashes2[0] = s[0];
  for (int i = 1; i < s.size(); ++i)
    hashes1[i] = (hashes1[i - 1] + 1ll * pws1[i] * (s[i])) % MOD1;
  for (int i = 1; i < s.size(); ++i)
    hashes2[i] = (hashes2[i - 1] + 1ll * pws2[i] * (s[i])) % MOD2;
  vector<string> dict;
  for (int i = 0; i < g; ++i) {
    string ss;
    cin >> ss;
    dict.push_back(ss);
    long long h1 = getHash1(ss);
    long long h2 = getHash2(ss);
    map<pair<long long, long long>, int>::iterator it =
        st.find(make_pair(h1, h2));
    if (it != st.end()) {
      return cout << "HUI\n", 0;
    }
    st[make_pair(h1, h2)] = i;
  }
  vector<int> used(g, -1);
  vector<int> ans(n, -1);
  for (int i = 0; i < k; ++i) {
    bool ok = 1;
    for (int j = 0; j < n; ++j) {
      long long h1 = getPodHash1(j * k + i, j * k + i + k);
      long long h2 = getPodHash2(j * k + i, j * k + i + k);
      map<pair<long long, long long>, int>::iterator it =
          st.find(make_pair(h1, h2));
      if (it == st.end()) {
        ok = 0;
        break;
      }
      if (used[it->second] == i) {
        ok = 0;
        break;
      }
      used[it->second] = i;
      ans[j] = it->second;
    }
    if (ok) {
      cout << "YES\n";
      for (int j = 0; j < n; ++j) cout << ans[j] + 1 << " ";
      cout << endl;
      return 0;
    }
  }
  return cout << "NO\n", 0;
}