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;
int pct(int x) { return __builtin_popcount(x); }
int pct(long long x) { return __builtin_popcountll(x); }
int bt(int x) { return 31 - __builtin_clz(x); }
int bt(long long x) { return 63 - __builtin_clzll(x); }
int cdiv(int a, int b) { return a / b + !(a < 0 || a % b == 0); }
long long cdiv(long long a, long long b) {
  return a / b + !(a < 0 || a % b == 0);
}
int nxt_C(int x) {
  int c = x & -x, r = x + c;
  return (((r ^ x) >> 2) / c) | r;
}
long long nxt_C(long long x) {
  long long c = x & -x, r = x + c;
  return (((r ^ x) >> 2) / c) | r;
}
vector<int> get_bits(int mask) {
  vector<int> bb;
  while (mask) {
    int b = bt(mask);
    bb.push_back(b);
    mask ^= (1 << b);
  }
  reverse(bb.begin(), bb.end());
  return bb;
}
int get_mask(vector<int> v) {
  int mask = 0;
  for (int x : v) {
    mask ^= (1 << x);
  }
  return mask;
}
template <typename T>
void uniq(vector<T> &v) {
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
}
template <typename T>
void leftShift(vector<T> &v, long long k) {
  k %= (int)v.size();
  if (k < 0) k += (int)v.size();
  rotate(v.begin(), v.begin() + k, v.end());
}
template <typename T>
void rightShift(vector<T> &v, long long k) {
  leftShift(v, (int)v.size() - k);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
long long rand(long long l, long long r) {
  uniform_int_distribution<long long> uid(l, r);
  return uid(rng);
}
void sc() {}
template <typename Head, typename... Tail>
void sc(Head &H, Tail &...T) {
  cin >> H;
  sc(T...);
}
string to_string(__int128 x) {
  string s = "";
  bool neg = 0;
  if (x < 0) {
    s += "-";
    neg = 1;
    x = -x;
  }
  if (!x) s += '0';
  while (x) {
    int rem = x % 10;
    s += to_string(rem);
    x /= 10;
  }
  reverse(s.begin() + neg, s.end());
  return s;
}
const int mod = 1e9 + 7;
int pwr(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = (ans * 1LL * a) % mod;
    a = (a * 1LL * a) % mod;
    b >>= 1;
  }
  return ans;
}
const int CHAR = 26;
class AhoCora {
 public:
  struct Node {
    unordered_map<int, int> ch;
    int link;
    int id;
    unordered_map<int, int> go;
  };
  inline int get_ch(int u, int c) {
    if (!nd[u].ch.count(c)) return -1;
    return nd[u].ch[c];
  }
  inline int get_go(int u, int c) {
    if (!nd[u].go.count(c)) return -1;
    return nd[u].go[c];
  }
  vector<Node> nd;
  vector<int> Q;
  int qs, qe;
  int size;
  int createNode() {
    int ret = size++;
    nd.emplace_back();
    Q.emplace_back();
    nd[ret].id = 0;
    return ret;
  }
  void init() {
    nd.reserve(1e6 + 5);
    Q.reserve(1e6 + 5);
    size = 0;
    nd.clear();
    Q.clear();
    createNode();
  }
  template <typename A>
  void add(A str, const int &sz, int &id) {
    int cur = 0;
    for (int i = 0; i < sz; i++) {
      int c = str[i] - 'a';
      if (get_ch(cur, c) == -1) {
        int nnd = createNode();
        nd[cur].ch[c] = nnd;
      }
      cur = get_ch(cur, c);
    }
    nd[cur].id = id;
  }
  inline int next(int u, int c) {
    if (get_go(u, c) != -1) return get_go(u, c);
    int uu = u;
    while (u && get_ch(u, c) < 0) u = nd[u].link;
    return nd[uu].go[c] = (get_ch(u, c) < 0) ? 0 : get_ch(u, c);
  }
  void computelink() {
    qs = qe = 0;
    nd[0].link = 0;
    for (auto i : nd[0].ch) {
      if (i.second >= 0) {
        Q[qe++] = i.second;
        nd[i.second].link = 0;
      }
    }
    while (qs < qe) {
      int u = Q[qs++];
      for (auto i : nd[u].ch) {
        if (i.second >= 0) {
          Q[qe++] = i.second;
          int m = nd[u].link;
          int L = nd[i.second].link = next(m, i.first);
        }
      }
    }
  }
} acc;
const int N = 2e6 + 5;
int mark[N];
bitset<N> taken;
void solve() {
  int n, k;
  sc(n, k);
  string s;
  sc(s);
  int tot = n * k;
  s += s;
  int g;
  sc(g);
  acc.init();
  for (int i = 1; i <= g; i++) {
    string p;
    sc(p);
    acc.add(p, (int)p.size(), i);
  }
  acc.computelink();
  int cur = 0;
  for (int i = 0; i <= 2 * tot - 1; i++) {
    cur = acc.next(cur, s[i] - 'a');
    if (acc.nd[cur].id) {
      mark[i] = acc.nd[cur].id;
      if (i >= tot) mark[i - tot] = mark[i];
      42;
    }
  }
  vector<int> z;
  for (int j = 0; j <= k - 1; j++) {
    int pos = j;
    z.clear();
    for (int i = 1; i <= n; i++) {
      if (mark[pos] && !taken[mark[pos]]) {
        z.push_back(mark[pos]);
        taken[mark[pos]] = 1;
      } else
        break;
      pos += k;
    }
    pos = j;
    for (int i = 1; i <= n; i++) {
      taken[mark[pos]] = 0;
      pos += k;
    }
    if ((int)z.size() == n) {
      cout << "YES" << '\n';
      for (int x : z) {
        cout << x << " ";
      }
      return;
    }
  }
  cout << "NO";
}
signed main() {
  ios ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  for (int tt = 1; tt <= t; tt++) {
    solve();
  }
  return 0;
}