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>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse2")
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long max(long long a, long long b) { return (a > b) ? a : b; }
long long min(long long a, long long b) { return (a < b) ? a : b; }
void amax(long long& a, long long b) { a = max(a, b) % 1000000007; }
void amin(long long& a, long long b) { a = min(a, b) % 1000000007; }
void inc(long long& a, long long b) { a = (a + b) % 1000000007; }
void dec(long long& a, long long b) { a = (a - b + 1000000007) % 1000000007; }
const long long MAXN = 2e6 + 10;
const long long M2 = 1e9 + 9;
vector<long long> h(MAXN, 0), h2(MAXN, 0), PI(MAXN, 0), PI2(MAXN, 0);
long long power(long long x, unsigned long long y, unsigned long long m) {
  if (y == 0) return 1;
  long long p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
void hashed(string s) {
  long long n = s.size();
  long long p = 31, cur = 1, val = 0;
  long long p2 = 31, cur2 = 1, val2 = 0;
  for (long long i = 0; i < n; i++) {
    val += (cur * (s[i] - 'a' + 1));
    val %= 1000000007;
    h[i] = val;
    PI[i] = power(cur, 1000000007 - 2, 1000000007);
    cur *= p;
    cur %= 1000000007;
    val2 += (cur2 * (s[i] - 'a' + 1));
    val2 %= M2;
    h2[i] = val2;
    PI2[i] = power(cur2, M2 - 2, M2);
    cur2 *= p2;
    cur2 %= M2;
  }
}
pair<long long, long long> hashed2(string s) {
  long long n = s.size();
  long long p = 31, cur = 1, val = 0;
  long long p2 = 31, cur2 = 1, val2 = 0;
  for (long long i = 0; i < n; i++) {
    val += (cur * (s[i] - 'a' + 1));
    val %= 1000000007;
    cur *= p;
    cur %= 1000000007;
    val2 += (cur2 * (s[i] - 'a' + 1));
    val2 %= M2;
    cur2 *= p2;
    cur2 %= M2;
  }
  return {val, val2};
}
long long solve() {
  long long n, k;
  string s;
  cin >> n >> k >> s;
  s = s + s;
  map<pair<long long, long long>, long long> keys;
  long long q;
  cin >> q;
  for (long long i = 0; i < q; i++) {
    string t;
    cin >> t;
    keys[hashed2(t)] = i + 1;
  }
  map<pair<long long, long long>, long long> m;
  vector<long long> ans(n + 1, -1);
  long long flag = 1, st = 1e9;
  hashed(s);
  for (long long j = 0; j < k; j++) {
    long long val = h[j + k - 1] + 1000000007;
    if (j) val -= h[j - 1];
    val %= 1000000007;
    val *= PI[j];
    val %= 1000000007;
    long long val2 = h2[j + k - 1] + M2;
    if (j) val2 -= h2[j - 1];
    val2 %= M2;
    val2 *= PI2[j];
    val2 %= M2;
    if (keys[{val, val2}]) {
      st = j;
      map<long long, long long> m;
      flag = 1;
      for (long long l = 0; l < n; l++) {
        long long i = l * k + st;
        long long right = i + k - 1;
        long long val = h[right] + 1000000007;
        if (i) val -= h[i - 1];
        val %= 1000000007;
        val *= PI[i];
        val %= 1000000007;
        long long val2 = h2[right] + M2;
        if (i) val2 -= h2[i - 1];
        val2 %= M2;
        val2 *= PI2[i];
        val2 %= M2;
        if (m[keys[{val, val2}]] || keys[{val, val2}] == 0) {
          flag = 0;
          break;
        }
        m[keys[{val, val2}]] = l + 1;
      }
      if (flag) {
        cout << "YES" << '\n';
        for (auto i : m) ans[i.second] = i.first;
        for (long long i = 1; i < n + 1; i++) cout << ans[i] << " ";
        return 0;
      }
    }
  }
  cout << "NO";
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
}