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 <class _T>
inline void ina(_T a[], int n) {
  for (int i = 0; i < n; i++) cin >> (a[i]);
}
int TEST_CASE = 0;
template <class _T>
inline _T pow(_T a, _T b, _T m) {
  a %= m;
  _T ans = 1 % m;
  while (b) {
    if (b & 1) ans *= a, ans %= m;
    a *= a;
    a %= m;
    b >>= 1;
  }
  return ans;
}
template <class _T>
inline _T pow(_T a, _T b) {
  _T ans = 1;
  while (b) {
    if (b & 1) ans *= a;
    a *= a;
    b >>= 1;
  }
  return ans;
}
template <class _T>
inline _T add(_T a, _T b, _T m) {
  return a >= m - b ? a - (m - b) : a + b;
}
template <class _T>
inline _T multiply(_T a, _T b, _T m) {
  _T ans = 0;
  if (b > a) swap(a, b);
  while (b) {
    if (b & 1) ans = add(ans, a, m);
    b >>= 1;
    a = add(a, a, m);
  }
  return ans;
}
template <class _T>
inline _T bigpow(_T a, _T b, _T m) {
  a %= m;
  _T ans = 1 % m;
  while (b) {
    if (b & 1) ans = multiply(ans, a, m);
    a = multiply(a, a, m);
    b >>= 1;
  }
  return ans;
}
template <class _T>
inline _T modinvers(_T a, _T m) {
  return m > 2000000000LL ? bigpow(a, m - 2, m) : pow(a, m - 2, m);
}
template <class _T>
_T _egcd(_T a, _T b, _T &x, _T &y) {
  if (!b) {
    x = 1, y = 0;
    return a;
  }
  _T _g = _egcd(b, a % b, x, y);
  _T xt = x;
  x = y, y = xt - (a / b) * y;
  return _g;
}
template <class _T>
inline _T fmodinvers(_T a, _T m) {
  _T x, y;
  _egcd(a, m, x, y);
  x %= m;
  if (x < 0) x += m;
  return x;
}
template <class _T>
inline _T _lcm(_T a, _T b) {
  return (a * b) / __gcd(a, b);
}
template <class T>
inline T SQ(T a) {
  return a * a;
}
long long SQRT(long long n) {
  long long e = sqrt(n * 1.0);
  long long l = max(0LL, e - 2), r = min(n, e + 2);
  long long ans = 0;
  while (l <= r) {
    long long m = ((l + r) >> 1);
    if (m * m <= n)
      ans = m, l = m + 1;
    else
      r = m - 1;
  }
  return ans;
}
long long CBRT(long long n) {
  long long e = cbrt(n * 1.0);
  long long l = max(0LL, e - 2), r = min(n, e + 2);
  long long ans = 0;
  while (l <= r) {
    long long m = ((l + r) >> 1);
    if (m * m * m <= n)
      ans = m, l = m + 1;
    else
      r = m - 1;
  }
  return ans;
}
const long double EPS = 1e-9;
const long double PI = acos(-1.0);
const int SIZE = 1e6;
long long mod = 1e9 + 7;
int tri[2000005][26], avl = 2;
int link[2000005];
unordered_map<int, int> M;
int id;
void ins(char *s) {
  int u = 1;
  for (int i = 0; s[i]; i++) {
    int c = s[i] - 'a';
    if (!tri[u][c]) tri[u][c] = avl++;
    u = tri[u][c];
  }
  M[u] = id;
}
void constructSL() {
  queue<int> q;
  for (int c = 0; c < 26; c++) {
    if (tri[1][c])
      link[tri[1][c]] = 1, q.push(tri[1][c]);
    else
      tri[1][c] = 1;
  }
  while (!q.empty()) {
    int u = q.front();
    q.pop();
    for (int c = 0; c < 26; c++) {
      if (tri[u][c]) {
        int v = tri[u][c];
        q.push(v);
        int w = link[u];
        while (!tri[w][c]) w = link[w];
        link[v] = tri[w][c];
      }
    }
  }
}
int P[2000005];
void run(char *s) {
  int u = 1;
  for (int i = 0; s[i]; i++) {
    int c = s[i] - 'a';
    while (!tri[u][c]) {
      u = link[u];
    }
    u = tri[u][c];
    if (((M).find(u) != (M).end()))
      P[i] = M[u];
    else
      P[i] = -1;
  }
}
char t[2000005], s[2000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  cin >> t;
  int nn = n * k;
  for (int i = 0; i < nn; i++) t[i + nn] = t[i];
  int m;
  cin >> m;
  for (int i = 1; i <= m; i++) {
    id = i;
    cin >> s;
    ins(s);
  }
  constructSL();
  run(t);
  for (int i = 0; i < k; i++) {
    int fnd = 1;
    unordered_set<int> r;
    vector<int> f;
    for (int j = 1; j <= n; j++) {
      if (~P[i + k * j - 1]) {
        if (((r).find(P[i + k * j - 1]) != (r).end())) {
          fnd = 0;
          break;
        } else {
          r.insert(P[i + k * j - 1]);
          f.push_back(P[i + k * j - 1]);
        }
      } else {
        fnd = 0;
        break;
      }
    }
    if (fnd) {
      cout << "YES\n";
      for (int y : f) cout << y << " ";
      cout << '\n';
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}