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 int m1 = 1e9 + 7, m2 = 1e9 + 9;
vector<long long int> v1, v2;
void precompute(long long int p, int MAX_SZ) {
  v1 = vector<long long int>(MAX_SZ);
  v2 = vector<long long int>(MAX_SZ);
  long long int p1 = 1, p2 = 1;
  for (int i = 0; i < MAX_SZ; i++) {
    v1[i] = p1;
    v2[i] = p2;
    p1 = (p1 * p) % m1;
    p2 = (p2 * p) % m2;
  }
}
struct Hash {
  vector<pair<int, int> > h;
  Hash(string &second) {
    if (!second.size()) return;
    h = vector<pair<int, int> >(second.size());
    pair<long long int, long long int> c_hash = {0, 0};
    h[0] = c_hash;
    for (int i = 0; i < second.size(); i++) {
      c_hash.first = (c_hash.first + (second[i] - 'a' + 1) * v1[i]) % m1;
      c_hash.second = (c_hash.second + (second[i] - 'a' + 1) * v2[i]) % m2;
      h[i] = c_hash;
    }
  }
  pair<int, int> getHash(int l, int r) {
    if (!h.size()) return {0, 0};
    long long int r1 = h[r].first, r2 = h[r].second;
    if (l) {
      r1 = (r1 - h[l - 1].first + m1) % m1;
      r2 = (r2 - h[l - 1].second + m2) % m2;
      int p = v1.size() - l - 1;
      r1 = (r1 * v1[p]) % m1;
      r2 = (r2 * v2[p]) % m2;
    } else {
      r1 = (r1 * v1.back()) % m1;
      r2 = (r2 * v2.back()) % m2;
    }
    return {r1, r2};
  }
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  precompute(1e8 + 7, 2e6 + 5);
  int n, k, g;
  string str;
  cin >> n >> k;
  cin >> str;
  str += str;
  Hash h(str);
  cin >> g;
  map<pair<int, int>, int> mp;
  for (int i = 1; i <= g; i++) {
    cin >> str;
    Hash h1(str);
    mp[h1.getHash(0, k - 1)] = i;
  }
  int flag = 0;
  for (int i = 0; i < k && !flag; i++) {
    unordered_set<int> aux;
    vector<int> ans;
    for (int j = 0; j < n; j++) {
      int x = mp[h.getHash(j * k + i, j * k + i + k - 1)];
      if (!x || aux.count(x)) break;
      aux.insert(x);
      ans.push_back(x);
    }
    if (aux.size() == n) {
      cout << "YES" << endl;
      for (auto a : ans) {
        if (!flag)
          cout << a;
        else
          cout << " " << a;
        flag = 1;
      }
      cout << endl;
    }
  }
  if (!flag) cout << "NO" << endl;
  return 0;
}