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 long long mod = (long long)1e9 + 9;
const int inf = (int)2e9;
const long long INF = (long long)1e18;
const int base = 1000 * 1000 * 1000;
const int maxn = 105;
const long double pi = acosl(-1.0);
const long double eps = 1e-9;
char buff[1000005];
void solve() {
  int n, k, q, p1 = 31, p2 = 26;
  scanf("%d %d", &n, &k);
  scanf(" %s", buff);
  string s(buff);
  assert((int)s.size() == 1LL * n * k);
  s += s.substr(0, k);
  map<pair<long long, long long>, int> mapa;
  vector<long long> pw1(k + 1, 1);
  vector<long long> pw2(k + 1, 1);
  for (int i = 1; i < k + 1; i++) pw1[i] = pw1[i - 1] * p1;
  for (int i = 1; i < k + 1; i++) pw2[i] = pw2[i - 1] * p2;
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    long long hash1 = 0, hash2 = 0;
    scanf(" %s", buff);
    string t(buff);
    assert((int)t.size() == k);
    for (int j = 0; j < (int)t.size(); j++) {
      hash1 = hash1 + t[j] * pw1[j];
      hash2 = hash2 + t[j] * pw2[j];
    }
    mapa[make_pair(hash1, hash2)] = i + 1;
  }
  assert(q == (int)mapa.size());
  vector<int> dp((int)s.size(), -1);
  vector<set<int>> a(k);
  long long hash1 = 0, hash2 = 0;
  for (int i = (int)s.size() - k; i < (int)s.size(); i++) {
    hash1 = hash1 + s[i] * pw1[i - (int)s.size() + k];
    hash2 = hash2 + s[i] * pw2[i - (int)s.size() + k];
  }
  for (int i = (int)s.size() - 1; i >= (int)s.size() - k; i--) dp[i] = 0;
  for (int i = (int)s.size() - k - 1; i >= 0; i--) {
    hash1 = hash1 * p1 - s[i + k] * pw1[k] + s[i];
    hash2 = hash2 * p2 - s[i + k] * pw2[k] + s[i];
    map<pair<long long, long long>, int>::iterator it =
        mapa.find(make_pair(hash1, hash2));
    if (it != mapa.end()) {
      int c = (*it).second;
      int d = i % k;
      if (dp[i + k] != -1 && a[d].find(c) == a[d].end()) {
        dp[i] = c;
        a[d].insert(c);
      }
    }
  }
  for (int i = 0; i < k; i++)
    if (dp[i] != -1) {
      puts("YES");
      int j = i;
      while (dp[j] != 0) {
        printf("%d ", dp[j]);
        j += k;
      }
      return;
    }
  puts("NO");
}
int main() {
  solve();
  return 0;
}