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 optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
using namespace std;
const long long N = 3e6 + 5;
const long long mod = 1e9 + 7;
const long long INF = 0x7f7f7f7f7f7f7f7f;
const int INFi = 0x7f7f7f7f;
long long test = 1, n, k, q;
map<pair<long long, unsigned long long>, long long> ct;
string second;
long long base = 1e9 + 7;
const long long hMOD = 1e9 + 123;
long long pow1[N];
unsigned long long pow2[N];
long long pref1[N];
unsigned long long pref2[N];
void init_base() {
  pow1[0] = pow2[0] = 1;
  for (int i = 1; i < N; i++) {
    pow1[i] = pow1[i - 1] * base % hMOD;
    pow2[i] = pow2[i - 1] * base;
  }
}
struct PolyHash {
  PolyHash(const string& second) {
    int n = second.size();
    pref1[0] = pref2[0] = 0;
    for (int i = 1; i <= n; i++) {
      pref1[i] = (pref1[i - 1] + second[i] * pow1[i - 1]) % hMOD;
      pref2[i] = pref2[i - 1] + second[i] * pow2[i - 1];
    }
  }
  inline pair<long long, unsigned long long> operator()(
      const int pos, const int len, const int mxPow = 0) const {
    long long hash1 = pref1[pos + len - 1] - pref1[pos - 1];
    unsigned long long hash2 = pref2[pos + len - 1] - pref2[pos - 1];
    if (hash1 < 0) hash1 += hMOD;
    if (mxPow != 0) {
      hash1 = hash1 * pow1[mxPow - (pos + len - 1)] % hMOD;
      hash2 *= pow2[mxPow - (pos + len - 1)];
    }
    return make_pair(hash1, hash2);
  }
};
void solve() {
  init_base();
  cin >> n >> k >> second;
  second = '#' + second + second;
  cin >> q;
  for (int i = 1; i <= q; i++) {
    string t;
    cin >> t;
    PolyHash hash('#' + t);
    ct[hash(1, k, N)] = i;
  }
  PolyHash hash(second);
  for (int i = 1; i <= k; i++) {
    vector<long long> v;
    set<long long> second;
    for (int j = i; j < n * k + i; j += k) {
      pair<long long, unsigned long long> val = hash(j, k, N);
      if (ct.find(val) != ct.end())
        second.insert(ct[val]), v.push_back(ct[val]);
    }
    if (second.size() == n) {
      cout << "YES"
           << "\n";
      for (auto it : v) cout << it << " ";
      cout << "\n";
      ;
      return;
    }
  }
  cout << "NO"
       << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(15);
  ;
  for (int i = 1; i <= test; i++) {
    solve();
  }
}