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 double eps = 1e-10;
const double pi = 3.1415926535897932384626433832795;
const double eln = 2.718281828459045235360287471352;
char s[1000005];
char ss[2000005];
int i, j, k, g, n, ans, t, m;
int num[2000005];
int hh[100005];
struct Trie {
  int num, fail, match;
  int next[26];
} trie[2200005];
int cnt;
void init() {
  cnt = 1;
  memset(trie, 0, 2 * sizeof(Trie));
  trie[0].fail = 1;
}
inline int convert(char ch) { return ch - 'a'; }
void insert(char *s, int bj) {
  int cur = 0;
  for (int i = 0; s[i]; i++) {
    int &pos = trie[cur].next[convert(s[i])];
    if (!pos) {
      pos = ++cnt;
      memset(&trie[cnt], 0, sizeof(Trie));
    }
    cur = pos;
  }
  trie[cur].num = bj;
}
void makeFail() {
  queue<int> q;
  q.push(0);
  while (!q.empty()) {
    int t = q.front();
    q.pop();
    for (int i = 0; i < 26; i++) {
      int &cur = trie[t].next[i];
      if (cur) {
        q.push(cur);
        trie[cur].fail = trie[trie[t].fail].next[i];
        trie[cur].match = trie[cur].num ? cur : trie[trie[cur].fail].match;
      } else
        cur = trie[trie[t].fail].next[i];
    }
  }
}
void search(char *s) {
  int ret = 0, cur = 0;
  for (int i = 0; i < t; i++) {
    cur = trie[cur].next[convert(s[i])];
    for (int temp = trie[cur].match; temp; temp = trie[trie[temp].fail].match)
      num[i - k + 1] = trie[temp].num;
  }
}
int main() {
  init();
  scanf("%d %d\n", &g, &k);
  gets(ss);
  t = strlen(ss);
  scanf("%d\n", &n);
  for (i = 0; i < k; i++) ss[i + t] = ss[i];
  t += k;
  ss[t] = '\0';
  for (i = 1; i <= n; i++) {
    gets(s);
    insert(s, i);
  }
  makeFail();
  search(ss);
  bool f = false;
  for (i = 1; i <= n; i++) hh[i] = -1;
  for (i = 0; i < k; i++) {
    f = true;
    for (j = 1; j <= g; j++) {
      int pos = (j - 1) * k + i;
      if (hh[num[pos]] == i || num[pos] == 0) {
        f = false;
        break;
      }
      if (hh[num[pos]] != i) hh[num[pos]] = i;
    }
    if (f) {
      printf("YES\n");
      for (j = 1; j <= g; j++) {
        if (j > 1) printf(" ");
        printf("%d", num[(j - 1) * k + i]);
      }
      return 0;
    }
  }
  printf("NO");
  return 0;
}