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;
struct PolyHash {
  static const int mod = 1e9 + 123;
  static vector<int> pow1;
  static vector<unsigned long long> pow2;
  static int base;
  vector<int> pref1;
  vector<unsigned long long> pref2;
  PolyHash(string& s) : pref1(s.size() + 1, 0), pref2(s.size() + 1, 0) {
    for (int i = 0; i < s.size(); i++)
      pref1[i + 1] = (pref1[i] + 1LL * s[i] * pow1[i]) % mod,
                pref2[i + 1] = (pref2[i] + s[i] * pow2[i]);
  }
  inline pair<int, unsigned long long> operator()(int pos, int len,
                                                  int mxpow = 0) const {
    int hash1 = pref1[pos + len] - pref1[pos];
    unsigned long long hash2 = pref2[pos + len] - pref2[pos];
    hash1 += (hash1 < 0 ? mod : 0);
    if (mxpow != 0)
      hash1 = 1LL * hash1 * pow1[mxpow - (pos + len - 1)] % mod,
      hash2 *= pow2[mxpow - (pos + len - 1)];
    return {hash1, hash2};
  }
};
int PolyHash::base(1e9 + 7);
vector<int> PolyHash::pow1{1};
vector<unsigned long long> PolyHash::pow2{1};
map<pair<int, unsigned long long>, int> mp;
set<pair<int, unsigned long long> > bef[100005];
bool ans[100005];
int main() {
  int n, k, g;
  string s, t;
  cin >> n >> k;
  cin >> s;
  cin >> g;
  set<pair<int, unsigned long long> > st;
  while (PolyHash::pow1.size() <= 2 * k * n)
    PolyHash::pow1.push_back(1LL * PolyHash::pow1.back() * PolyHash::base %
                             PolyHash::mod),
        PolyHash::pow2.push_back(PolyHash::pow2.back() * PolyHash::base);
  for (int i = 0; i < g; i++) {
    cin >> t;
    PolyHash hash_t(t);
    st.insert(hash_t(0, k, 2 * k * n));
    mp[hash_t(0, k, 2 * k * n)] = i;
  }
  PolyHash hash_s(s += s);
  for (int i = 0; i < k * n; i++) {
    if (st.find(hash_s(i, k, 2 * k * n)) == st.end())
      ans[i % k] = 1;
    else if (bef[i % k].insert(hash_s(i, k, 2 * k * n)).second == 0)
      ans[i % k] = 1;
  }
  int an = find(ans, ans + k, 0) - ans;
  if (an == k) return puts("NO");
  puts("YES");
  for (int i = 0; i < n; i++, an += k)
    cout << mp[hash_s(an, k, 2 * k * n)] + 1 << ' ';
  cout << endl;
}