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;
template <typename T>
void sci(T& t) {
  cin >> t;
}
template <typename T, typename... Ts>
void sci(T& t, Ts&... ts) {
  sci(t);
  sci(ts...);
};
long long M1 = 1e9 + 7;
long long M2 = 1e9 + 9;
long long p1 = 31;
long long p2 = 239;
int d[2222222];
int p[2222222];
long long hs1[2222222];
long long hs2[2222222];
long long ps1[2222222];
long long ps2[2222222];
int last[111111];
int tt[111111];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, k;
  sci(n, k);
  string s;
  sci(s);
  s += s;
  int m;
  sci(m);
  map<pair<long long, long long>, int> gs;
  for (int i = 0; i < m; i++) {
    string g;
    sci(g);
    long long h1 = 0;
    long long h2 = 0;
    for (int j = 0; j < k; j++) {
      h1 = (h1 * p1 + g[j] - 'a' + 1) % M1;
      h2 = (h2 * p2 + g[j] - 'a' + 1) % M2;
    }
    gs[{h1, h2}] = i;
  }
  long long h1 = 0;
  long long h2 = 0;
  for (int i = 0; i < s.size(); i++) {
    h1 = (h1 * p1 + s[i] - 'a' + 1) % M1;
    h2 = (h2 * p2 + s[i] - 'a' + 1) % M2;
    hs1[i] = h1;
    hs2[i] = h2;
  }
  long long p1k = 1;
  long long p2k = 1;
  for (int i = 0; i < s.size() + 1; i++) {
    ps1[i] = p1k;
    ps2[i] = p2k;
    p1k = p1k * p1 % M1;
    p2k = p2k * p2 % M2;
  }
  int tm = 0;
  int len = s.size();
  for (int md = 0; md < k; md++) {
    ++tm;
    fill(d, d + 2 * n + 1, 0);
    int ii = 1;
    for (int i = md; i < len; i += k, ii++) {
      h1 = ((hs1[i] - (i == md ? 0 : hs1[i - k] * ps1[k])) % M1 + M1) % M1;
      h2 = ((hs2[i] - (i == md ? 0 : hs2[i - k] * ps2[k])) % M2 + M2) % M2;
      auto it = gs.find({h1, h2});
      if (it != gs.end()) {
        d[ii] = d[ii - 1] + 1;
        int x = it->second;
        p[ii] = x;
        if (tt[x] == tm) {
          d[ii] = min(d[ii], ii - last[x]);
        }
        tt[x] = tm;
        last[x] = ii;
      }
    }
    for (int i = 1; i < ii; i++) {
      if (d[i] == n) {
        cout << "YES\n";
        int x = i;
        vector<int> ans;
        for (int j = 0; j < n; j++) {
          ans.push_back(p[x]);
          x--;
        }
        reverse(ans.begin(), ans.end());
        for (int i : ans) {
          cout << i + 1 << " ";
        }
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}