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;
inline void debugMode() {}
unsigned seed = chrono::system_clock::now().time_since_epoch().count();
linear_congruential_engine<uint_fast32_t, 1002517UL, 1001593UL, 2147483647UL>
    lcg(seed);
int primes_for_mod[] = {1000019353, 1000001087, 1000020353, 1000003267,
                        1000000439, 1000018001, 1000019569, 1000020701,
                        1000016929, 1000007521, 1000007773, 1000013323,
                        1000018379, 1000017203, 1000006211, 1000004693,
                        1000013011, 1000020829, 1000011277, 1000007147};
int primes_for_base[] = {1831, 1061, 5927, 6689, 7529, 9719, 3917,
                         271,  6029, 6091, 9719, 2819, 4877, 9679,
                         23,   6373, 6101, 1039, 4591, 5531};
long long computeHash(const string& s, const long long p, const long long mod) {
  long long res = 0;
  long long pp = 1;
  for (char c : s) {
    res = (res + pp * (c - 'a' + 1)) % mod;
    pp = (pp * p) % mod;
  }
  return res;
}
template <class T>
T n_inverse_mod_m(T n, T m) {
  T rn_1, rn, sn_1, sn, tn_1, tn, tr, ts, tt, q;
  rn_1 = n;
  sn_1 = 1;
  tn_1 = 0;
  rn = m;
  sn = 0;
  tn = 1;
  while (1) {
    tr = rn_1 % rn;
    q = (rn_1 - tr) / rn;
    ts = sn_1 - (q * sn);
    tt = tn_1 - (q * tn);
    if (tr == 0) {
      return (sn + m) % m;
    }
    sn_1 = sn;
    sn = ts;
    tn_1 = tn;
    tn = tt;
    rn_1 = rn;
    rn = tr;
  }
}
long long modular_exp(long long a, long long b, long long mod) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % mod;
    b = b >> 1;
    a = (a * a) % mod;
  }
  return ans;
}
struct SingularHash {
  const char sub = 'a';
  long long mod, p, pinv;
  int* hashValue = NULL;
  int* pPower = NULL;
  int* pInv = NULL;
  int n;
  SingularHash() { n = -1; }
  SingularHash(int size, long long mod, long long p) {
    n = size;
    this->mod = mod;
    this->p = p;
    pinv = modular_exp(p, mod - 2, mod);
    hashValue = new int[size];
    pPower = new int[size];
    pInv = new int[size];
  }
  SingularHash(const string& s, long long mod, long long p) {
    n = (int)s.size();
    this->mod = mod;
    this->p = p;
    hashValue = new int[n];
    pPower = new int[n];
    pInv = new int[n];
    pinv = modular_exp(p, mod - 2, mod);
    construct(s);
  }
  void construct(const string& s) {
    pPower[0] = pInv[0] = 1;
    hashValue[0] = s[0] - sub + 1;
    int slen = (int)s.length();
    for (int i = 1; i < slen; i++) {
      pPower[i] = (pPower[i - 1] * p) % mod;
      pInv[i] = (pInv[i - 1] * pinv) % mod;
      hashValue[i] =
          (hashValue[i - 1] + (long long)(s[i] - sub + 1) * pPower[i]) % mod;
    }
  }
  int subArray(int l, int r) {
    if (l > r) swap(l, r);
    long long ans =
        (hashValue[r] - (l == 0 ? 0 : hashValue[l - 1]) + mod) % mod;
    ans = (ans * pInv[l]) % mod;
    return (int)ans;
  }
  int cyclicSubArray(int l, int r) {
    if (l <= r) return subArray(l, r);
    long long res = subArray(l, n - 1);
    return (int)((res + (((long long)hashValue[r] * pPower[n - l]) % mod)) %
                 mod);
  }
  ~SingularHash() {
    if (n != -1) {
      if (hashValue != NULL) delete[] hashValue;
      if (pPower != NULL) delete[] pPower;
      if (pInv != NULL) delete[] pInv;
    }
  }
};
void solvecases(int cse) {
  int cm = lcg() % (sizeof(primes_for_mod) / sizeof(int));
  int cp = lcg() % (sizeof(primes_for_base) / sizeof(int));
  long long mod = primes_for_mod[cm];
  long long p = primes_for_base[cp];
  cm = lcg() % (sizeof(primes_for_mod) / sizeof(int));
  cp = lcg() % (sizeof(primes_for_base) / sizeof(int));
  long long mod2 = primes_for_mod[cm];
  long long p2 = primes_for_base[cp];
  int n, k;
  string s;
  cin >> n >> k >> s;
  SingularHash sh(s, mod, p);
  SingularHash sh2(s, mod2, p2);
  int g;
  cin >> g;
  set<pair<int, int> > st;
  map<pair<int, int>, int> pos;
  for (int i = 0; i < g; i++) {
    string tmp;
    cin >> tmp;
    int hval = computeHash(tmp, p, mod);
    int hval2 = computeHash(tmp, p2, mod2);
    st.insert({hval, hval2});
    pos[{hval, hval2}] = i + 1;
  }
  int m = n * k;
  vector<pair<int, int> > sol(n);
  for (int i = 0; i < k; i++) {
    int j;
    for (j = 0; j < n - 1; j++) {
      int hval = sh.subArray(j * k + i, j * k + k + i - 1);
      int hval2 = sh2.subArray(j * k + i, j * k + k + i - 1);
      if (st.find({hval, hval2}) == st.end()) break;
      sol[j] = {hval, hval2};
    }
    if (j != n - 1) continue;
    int hval = sh.cyclicSubArray(j * k + i, (j * k + k + i - 1) % m);
    int hval2 = sh2.cyclicSubArray(j * k + i, (j * k + k + i - 1) % m);
    if (st.find({hval, hval2}) != st.end()) {
      sol[j] = {hval, hval2};
      set<pair<int, int> > tset;
      for (auto e : sol) tset.insert(e);
      if ((int)tset.size() != n) continue;
      cout << "YES\n";
      for (auto e : sol) cout << pos[e] << ' ';
      cout << '\n';
      return;
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solvecases(i);
  }
}