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;
struct suffix_hash {
  int n;
  const int p1 = 313, p2 = 1013;
  const int m1 = 1e9 + 7, m2 = 1e9 + 9;
  vector<long long> pow1, pow2, h1, h2;
  void init(string &x) {
    n = x.size();
    h1.resize(n);
    h2.resize(n);
    pow1.resize(n);
    pow2.resize(n);
    compute(x);
  }
  void compute(string &x) {
    pow1[0] = pow2[0] = 1;
    for (int i = 1; i < n; i++) {
      pow1[i] = (pow1[i - 1] * p1) % m1;
      pow2[i] = (pow2[i - 1] * p2) % m2;
    }
    h1[0] = h2[0] = x[0];
    for (int i = 1; i < n; i++) {
      h1[i] = (h1[i - 1] * p1 + x[i]) % m1;
      h2[i] = (h2[i - 1] * p2 + x[i]) % m2;
    }
  }
  pair<int, int> get_hash(int i, int j) {
    long long a = h1[j];
    if (i) a -= h1[i - 1] * pow1[j - i + 1];
    a = ((a % m1) + m1) % m1;
    long long b = h2[j];
    if (i) b -= h2[i - 1] * pow2[j - i + 1];
    b = ((b % m2) + m2) % m2;
    return {a, b};
  }
} h;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k, g;
  string x, y;
  cin >> n >> k >> x >> g;
  suffix_hash games[g + 1];
  games[0].init(x);
  map<pair<int, int>, int> M;
  for (int i = 1; i <= g; i++) {
    cin >> y;
    games[i].init(y);
    M[games[i].get_hash(0, k - 1)] = i;
  }
  if (n == 1) {
    if (M.find(games[0].get_hash(0, k - 1)) != M.end())
      return cout << "YES\n" << M[games[0].get_hash(0, k - 1)], 0;
    for (int i = 0; i < k - 1; i++) {
      for (int j = 1; j <= g; j++) {
        if (games[j].get_hash(0, i) == games[0].get_hash(k - i - 1, k - 1) &&
            games[j].get_hash(i + 1, k - 1) == games[0].get_hash(0, k - i - 2))
          return cout << "YES\n" << j, 0;
      }
    }
    return cout << "NO\n", 0;
  }
  vector<int> match;
  for (int i = k - 1; i < 2 * k - 1; i++) {
    if (M.find(games[0].get_hash(i - k + 1, i)) != M.end()) match.push_back(i);
  }
  for (int i = 0; i < match.size(); i++) {
    set<int> res;
    vector<int> ans;
    for (int j = match[i]; j < n * k; j += k) {
      auto a = games[0].get_hash(j - k + 1, j);
      if (M.find(a) != M.end() && res.find(M[a]) == res.end()) {
        res.insert(M[a]);
        ans.push_back(M[a]);
      } else
        break;
    }
    if (match[i] >= k && res.size() == n - 1) {
      int pre = (match[i] % k + 1), suf = k - pre;
      auto a = games[0].get_hash(0, pre - 1),
           b = games[0].get_hash(n * k - suf, n * k - 1);
      for (int j = 1; j <= g; j++) {
        if (res.find(j) != res.end()) continue;
        if (games[j].get_hash(0, suf - 1) == b &&
            games[j].get_hash(suf, k - 1) == a) {
          cout << "YES\n";
          cout << j;
          for (auto k : ans) cout << " " << k;
          return 0;
        }
      }
    }
    if (res.size() == n) {
      cout << "YES\n";
      for (auto i : ans) cout << i << " ";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}