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 MAX = 2e6 + 5, B1 = 37, B2 = 41, M1 = 1e9 + 7, M2 = 1e9 + 21;
int n, k, m, p[MAX], sz[MAX];
char a[MAX], b[MAX], e[MAX];
struct data {
  pair<int, int> h;
  int id;
  data(pair<int, int> h, int id) : h(h), id(id) {}
  bool operator<(const data &d) const { return h < d.h; }
};
multiset<data> s;
vector<int> v[MAX];
pair<int, int> pw[MAX], inv[MAX], t[MAX];
int findst(int x) { return p[x] = (x == p[x]) ? x : findst(p[x]); }
void joinst(int a, int b) {
  a = findst(a);
  b = findst(b);
  if (a == b) return;
  if (sz[a] < sz[b]) swap(a, b);
  p[b] = a;
  sz[a] += sz[b];
}
int exp(int a, int b, int M) {
  if (b == 0) return 1;
  if (b & 1) return (a * 1LL * exp(a, b - 1, M)) % M;
  int sq = exp(a, b / 2, M);
  return (sq * 1LL * sq) % M;
}
pair<int, int> getHash(int i, int j) {
  int h1 = (0LL + t[j].first - t[i - 1].first + M1) % M1;
  h1 = (h1 * 1LL * inv[i].first) % M1;
  int h2 = (0LL + t[j].second - t[i - 1].second + M2) % M2;
  h2 = (h2 * 1LL * inv[i].second) % M2;
  return {h1, h2};
}
int main() {
  scanf("%d%d%s", &n, &k, a);
  pw[0].first = pw[0].second = inv[0].first = inv[0].second = 1;
  for (int i = 1; i <= 2 * n * k; i++) {
    pw[i].first = (pw[i - 1].first * 1LL * B1) % M1;
    pw[i].second = (pw[i - 1].second * 1LL * B2) % M2;
    inv[i].first = exp(pw[i].first, M1 - 2, M1);
    inv[i].second = exp(pw[i].second, M2 - 2, M2);
  }
  for (int i = 0; i < n * k; i++) b[i] = a[i];
  for (int i = n * k; i < 2 * n * k; i++) b[i] = a[i - n * k];
  for (int i = 0; i < 2 * n * k; i++) {
    int c = b[i] - 'a' + 1;
    t[i].first = (0LL + t[i - 1].first + c * 1LL * pw[i].first) % M1;
    t[i].second = (0LL + t[i - 1].second + c * 1LL * pw[i].second) % M2;
  }
  scanf("%d", &m);
  for (int i = 0; i < m; i++) {
    scanf("%s", e);
    int l = strlen(e);
    pair<int, int> h = {0, 0};
    for (int j = 0; j < l; j++) {
      int c = e[j] - 'a' + 1;
      h.first = (0LL + h.first + c * 1LL * pw[j].first) % M1;
      h.second = (0LL + h.second + c * 1LL * pw[j].second) % M2;
    }
    s.insert(data(h, i));
  }
  for (int i = 0; i < n * k; i++) p[i] = i, sz[i] = 1;
  for (int i = 0; i < n * k; i++) joinst(i, (i + k) % (n * k));
  for (int i = 0; i < n * k; i++) v[findst(i)].push_back(i);
  for (int i = 0; i < n * k; i++) {
    if (v[i].empty()) continue;
    vector<data> q;
    vector<int> ids;
    int bad = 0;
    for (int p : v[i]) {
      auto h = getHash(p, p + k - 1);
      auto it = s.find(data(h, -1));
      int id = it->id;
      if (it == s.end()) {
        bad = 1;
        break;
      }
      s.erase(it);
      q.push_back(data(h, id));
      ids.push_back(id);
    }
    if (!bad) {
      printf("YES\n");
      for (int p : ids) printf("%d ", p + 1);
      printf("\n");
      return 0;
    }
    for (auto o : q) s.insert(o);
  }
  printf("NO\n");
  return 0;
}