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 el {
  map<char, int> ne, go;
  int leaf = -1;
  int pr = 0;
  char prc;
  int link = -1;
};
vector<el> bor(1);
void get_go(int v, char sy);
void get_link(int v) {
  int pa = bor[v].pr;
  char sy = bor[v].prc;
  if ((v == 0) or (pa == 0))
    bor[v].link = 0;
  else {
    if (bor[pa].link == -1) get_link(pa);
    map<char, int>::iterator it = bor[bor[pa].link].go.find(sy);
    if (it == bor[bor[pa].link].go.end()) get_go(bor[pa].link, sy);
    bor[v].link = bor[bor[pa].link].go[sy];
  }
}
void get_go(int v, char sy) {
  map<char, int>::iterator it = bor[v].ne.find(sy);
  if (it == bor[v].ne.end()) {
    if (v == 0)
      bor[v].go[sy] = 0;
    else {
      if (bor[v].link == -1) get_link(v);
      map<char, int>::iterator it = bor[bor[v].link].go.find(sy);
      if (it == bor[bor[v].link].go.end()) get_go(bor[v].link, sy);
      bor[v].go[sy] = bor[bor[v].link].go[sy];
    }
  } else
    bor[v].go[sy] = bor[v].ne[sy];
}
int main() {
  ifstream in("input.txt");
  int n, k, g;
  string s;
  cin >> n >> k >> s >> g;
  for (int a = 0; a < g; a++) {
    string cu;
    cin >> cu;
    int v = 0;
    for (int b = 0; b < k; b++) {
      map<char, int>::iterator it = bor[v].ne.find(cu[b]);
      if (it == bor[v].ne.end()) {
        el* nel = new el;
        bor[v].ne[cu[b]] = bor.size();
        bor.push_back(*nel);
        bor.back().pr = v;
        bor.back().prc = cu[b];
      }
      v = bor[v].ne[cu[b]];
    }
    bor[v].leaf = a;
  }
  s += s;
  int v = 0, sov[s.size()];
  set<int> se[k];
  for (int a = 0; a < s.size(); a++) {
    char sy = s[a];
    map<char, int>::iterator it = bor[v].go.find(sy);
    if (it == bor[v].go.end()) get_go(v, sy);
    v = bor[v].go[sy];
    int nu = bor[v].leaf;
    if (nu != -1) {
      sov[a + 1 - k] = nu;
      se[(a + 1 - k) % k].insert(nu);
    }
  }
  bool fo = 0;
  for (int a = 0; a < k; a++) {
    if (se[a].size() == n) {
      cout << "YES\n";
      for (int b = 0; b < n; b++) cout << sov[a + b * k] + 1 << " ";
      fo = 1;
      break;
    }
  }
  if (fo == 0) cout << "NO";
}