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 int INF = 1000000000;
const int M1 = INF + 7;
const int M2 = INF + 9;
const int P = 31;
vector<pair<unsigned long long, unsigned long long> > p;
int n, N, k;
string s;
void cnt_pow(int siez) {
  p.resize(siez);
  p[0] = make_pair(1, 1);
  for (int i = 1; i < siez; i++) {
    p[i].first = p[i - 1].first * P % M1;
    p[i].second = p[i - 1].second * P % M2;
  }
}
unsigned long long ord(char a) { return a - 'a' + 1; }
pair<unsigned long long, unsigned long long> pl(
    pair<unsigned long long, unsigned long long> prev, char a) {
  prev.first = ((prev.first * P) % M1 + ord(a)) % M1;
  prev.second = ((prev.second * P) % M2 + ord(a)) % M2;
  return prev;
}
unsigned long long df(unsigned long long s, char a, unsigned long long mod) {
  while (s <= ord(a) * P) {
    s += mod;
  }
  return (s - ord(a) * P) % mod;
}
pair<unsigned long long, unsigned long long> get_hash(string s, int l = -1) {
  if (l == -1) l = s.size();
  pair<unsigned long long, unsigned long long> res = make_pair(0, 0);
  for (int i = 0; i < l; i++) {
    res = pl(res, s[i]);
  }
  return res;
}
pair<unsigned long long, unsigned long long> tomax(
    pair<unsigned long long, unsigned long long> hash, int b = 0) {
  if (k == 1) return hash;
  for (int i = b; i < p.size(); i++) {
    hash.first = (hash.first * p[1].first) % M1;
    hash.second = (hash.second * p[1].second) % M2;
  }
  return hash;
}
pair<unsigned long long, unsigned long long> get_sub(
    int b, int e, vector<pair<unsigned long long, unsigned long long> > &h) {
  pair<unsigned long long, unsigned long long> res = h[e];
  unsigned long long debug = (h[b].first * p[e - b].first) % M1;
  while (res.first < (h[b].first * p[e - b].first) % M1) res.first += M1;
  debug = h[b].second * p[e - b].second % M2;
  while (res.second < (h[b].second * p[e - b].second) % M2) res.second += M2;
  res.first -= (h[b].first * p[e - b].first) % M1;
  res.first %= M1;
  res.second -= (h[b].second * p[e - b].second) % M2;
  res.second %= M2;
  return res;
}
int main() {
  cin >> n >> k;
  cnt_pow(n * k * 2);
  cin >> s;
  N = s.size();
  s += s + s;
  vector<pair<unsigned long long, unsigned long long> > hashes(s.size() + 1);
  hashes[0] = make_pair(0, 0);
  for (int i = 1; i < s.size(); i++) {
    hashes[i] = pl(hashes[i - 1], s[i - 1]);
  }
  int g;
  cin >> g;
  map<pair<unsigned long long, unsigned long long>, int> mg;
  vector<pair<unsigned long long, unsigned long long> > vg(g);
  string buff;
  for (int i = 0; i < g; i++) {
    cin >> buff;
    vg[i] = get_hash(buff);
    mg.insert(make_pair(vg[i], i));
  }
  vector<int> ans;
  int j, cnt = 0;
  map<pair<unsigned long long, unsigned long long>, int>::iterator res;
  pair<unsigned long long, unsigned long long> cur;
  vector<int> used(g, -1);
  for (int i = 0; i < k && cnt < n; i++) {
    cur = get_sub(i, i + k, hashes);
    res = mg.find(cur);
    j = i + k;
    cnt = 0;
    while (res != mg.end() && j + k < hashes.size() && used[res->second] != i) {
      cnt++;
      ans.push_back(res->second);
      used[res->second] = i;
      cur = get_sub(j, j + k, hashes);
      res = mg.find(cur);
      j += k;
    }
    if (cnt < n) {
      ans.clear();
    }
  }
  if (cnt < n) {
    cout << "NO";
  } else {
    cout << "YES" << endl;
    for (int i : ans) {
      cout << i + 1 << " ";
    }
  }
  return 0;
}