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>
#pragma comment(linker, "/STACK:36777216")
using namespace std;
const int kAlphabetSize = 27;
struct Node {
  vector<int> children;
  int suffix_link;
  int pattern_index;
  int depth;
  Node() : children(26, -1), suffix_link(-1), pattern_index(-1), depth(0) {}
};
void AddString(vector<Node>& trie, const string& s, int pattern_index) {
  int cur = 0;
  for (int i = 0; i < s.length(); ++i) {
    int chindex = s[i] - 'a';
    if (trie[cur].children[chindex] == -1) {
      trie[cur].children[chindex] = trie.size();
      trie.push_back(Node());
      trie.back().depth = trie[cur].depth + 1;
    }
    cur = trie[cur].children[chindex];
  }
  trie[cur].pattern_index = pattern_index;
}
bool FindGames(string disk, const vector<string>& games, int k,
               vector<int>& indices) {
  vector<Node> trie;
  trie.push_back(Node());
  trie[0].suffix_link = 0;
  for (int i = 0; i < games.size(); ++i) {
    AddString(trie, games[i], i);
  }
  queue<int> q;
  q.push(0);
  while (!q.empty()) {
    int cur = q.front();
    q.pop();
    for (int i = 0; i < trie[cur].children.size(); ++i) {
      if (trie[cur].children[i] == -1) {
        continue;
      }
      int child = trie[cur].children[i];
      q.push(child);
      if (cur == 0) {
        trie[child].suffix_link = 0;
        continue;
      }
      int from = trie[cur].suffix_link;
      while (from != 0 && trie[from].children[i] == -1) {
        from = trie[from].suffix_link;
      }
      if (trie[from].children[i] != -1) {
        trie[child].suffix_link = trie[from].children[i];
      } else {
        trie[child].suffix_link = 0;
      }
    }
  }
  disk += disk;
  vector<int> starts(disk.length(), -1);
  int trie_pos = 0;
  for (int ind = 0; ind < k; ++ind) {
    if (trie[trie_pos].children[disk[ind] - 'a'] == -1) {
      break;
    }
    trie_pos = trie[trie_pos].children[disk[ind] - 'a'];
  }
  if (trie[trie_pos].depth == k) {
    starts[0] = trie[trie_pos].pattern_index;
  }
  int start = 0;
  while (start + k <= disk.length()) {
    int cur_depth = trie[trie_pos].depth;
    trie_pos = trie[trie_pos].suffix_link;
    start += max(cur_depth - trie[trie_pos].depth, 1);
    int str_pos = start + trie[trie_pos].depth;
    while (str_pos < disk.length() && trie[trie_pos].depth < k) {
      int chindex = disk[str_pos] - 'a';
      if (trie[trie_pos].children[chindex] == -1) {
        break;
      }
      trie_pos = trie[trie_pos].children[chindex];
      ++str_pos;
    }
    if (trie[trie_pos].depth == k) {
      starts[start] = trie[trie_pos].pattern_index;
    }
  }
  for (int start = 0; start < k; ++start) {
    bool ok = true;
    set<int> was;
    int cur = start;
    indices.clear();
    for (int it = 0; it < disk.length() / 2 / k; ++it) {
      if (starts[cur] == -1) {
        ok = false;
        break;
      }
      if (was.count(starts[cur])) {
        ok = false;
        break;
      }
      indices.push_back(starts[cur]);
      was.insert(starts[cur]);
      cur += k;
    }
    if (ok) {
      return true;
    }
  }
  return false;
}
bool FindGamesStupid(string disk, const vector<string>& games, int k,
                     vector<int>& indices) {
  disk += disk;
  map<string, int> all_games;
  for (int i = 0; i < games.size(); ++i) {
    all_games[games[i]] = i;
  }
  for (int start = 0; start < disk.length() / 2; ++start) {
    bool ok = true;
    indices.clear();
    set<int> was;
    for (int j = start; j < start + disk.length() / 2; j += k) {
      if (!all_games.count(disk.substr(j, k))) {
        ok = false;
        break;
      }
      int index = all_games[disk.substr(j, k)];
      if (was.count(index)) {
        ok = false;
        break;
      }
      indices.push_back(index);
      was.insert(index);
    }
    if (ok) {
      return true;
    }
  }
}
bool Check(string disk, const vector<string>& games, const vector<int>& ans) {
  string res = "";
  for (int i = 0; i < ans.size(); ++i) {
    res += games[ans[i]];
  }
  for (int start = 0; start < disk.length(); ++start) {
    if ((disk.substr(start) + disk.substr(0, start)) == res) {
      return true;
    }
  }
  return false;
}
int main() {
  int n, k;
  cin >> n >> k;
  string disk;
  char buffer[2000000];
  scanf("%s", buffer);
  disk = buffer;
  int g;
  scanf("%d", &g);
  vector<string> games(g);
  for (int i = 0; i < g; ++i) {
    scanf("%s", buffer);
    games[i] = buffer;
  }
  vector<int> ans;
  bool find_games = FindGames(disk, games, k, ans);
  if (!find_games) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (int i = 0; i < ans.size(); ++i) {
    printf("%d ", ans[i] + 1);
  }
  printf("\n");
  return 0;
}