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 <typename S, typename T>
ostream& operator<<(ostream& out, pair<S, T> const& p) {
  out << '(' << p.first << ", " << p.second << ')';
  return out;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> const& v) {
  long long int l = v.size();
  for (long long int i = 0; i < l - 1; i++) out << v[i] << ' ';
  if (l > 0) out << v[l - 1];
  return out;
}
template <typename T>
void trace(const char* name, T&& arg1) {
  cout << name << " : " << arg1 << "\n";
}
template <typename T, typename... Args>
void trace(const char* names, T&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  trace(comma + 1, args...);
}
long long int hash1[1000001];
long long int po[1000001];
long long int hash2[1000001];
long long int po2[1000001];
string s;
long long int si;
long long int p = 31;
long long int p2 = 41;
long long int m = 1000174579;
long long int m2 = 1000000009;
long long int sub_hash(long long int i, long long int j) {
  long long int thash;
  if (i <= j)
    thash = (hash1[i] + m - ((hash1[j + 1]) * po[j + 1 - i]) % m) % m;
  else
    thash = (hash1[i] + sub_hash(0, j) * po[si - i]) % m;
  return thash;
}
long long int sub_hash2(long long int i, long long int j) {
  long long int thash;
  if (i <= j)
    thash = (hash2[i] + m2 - ((hash2[j + 1]) * po2[j + 1 - i]) % m2) % m2;
  else
    thash = (hash2[i] + sub_hash2(0, j) * po2[si - i]) % m2;
  return thash;
}
pair<long long, long long> find_hash(const string& s, long long int si) {
  long long int ans1, ans2;
  for (long long int i = si - 1; i >= 0; i--) {
    if (i == si - 1) {
      ans1 = s[i] - 'a' + 1;
      ans2 = s[i] - 'a' + 1;
    } else {
      ans1 = (s[i] - 'a' + 1 + ans1 * p) % m;
      ans2 = (s[i] - 'a' + 1 + ans2 * p2) % m2;
    }
  }
  return make_pair(ans1, ans2);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  si = n * k;
  cin >> s;
  for (long long int i = 0; i < si; i++) {
    if (i == 0) {
      po2[i] = 1;
      po[i] = 1;
    } else {
      po[i] = (po[i - 1] * p) % m;
      po2[i] = (po2[i - 1] * p2) % m2;
    }
  }
  hash1[si] = 0;
  hash2[si] = 0;
  for (long long int i = si - 1; i >= 0; i--) {
    if (i == si - 1) {
      hash1[i] = s[i] - 'a' + 1;
      hash2[i] = s[i] - 'a' + 1;
    } else {
      hash1[i] = (s[i] - 'a' + 1 + hash1[i + 1] * p) % m;
      hash2[i] = (s[i] - 'a' + 1 + hash2[i + 1] * p2) % m2;
    }
  }
  long long int g;
  cin >> g;
  map<pair<long long, long long>, long long int> ma;
  for (long long int i = 0; i < g; i++) {
    string ts;
    cin >> ts;
    ma[find_hash(ts, k)] = i;
  }
  vector<long long int> v;
  for (long long int i = 0; i < si; i++) {
    pair<long long, long long> tp = make_pair(sub_hash(i, (i + k - 1) % si),
                                              sub_hash2(i, (i + k - 1) % si));
    if (ma.find(tp) != ma.end()) {
      v.push_back(ma[tp]);
    } else {
      v.push_back(-1);
    }
  }
  for (long long int i = 0; i < k; i++) {
    long long int index = i;
    set<long long int> temp;
    vector<long long int> temp1;
    for (long long int j = 0; j < n; j++) {
      index = (index + k) % si;
      if (v[index] == -1)
        break;
      else {
        if (temp.find(v[index]) != temp.end()) break;
        temp.insert(v[index]);
        temp1.push_back(v[index]);
      }
    }
    if (temp.size() == n) {
      cout << "YES\n";
      for (auto& e : temp1) {
        cout << e + 1 << " ";
      }
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}