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 JAVA):

Solution:
import java.util.*;
import java.io.*;

public class E_727 {
	
	public static Tuple extended_gcd(int a, int b) {
		if(a == 0) {
			return new Tuple(0, 1, b);
		}
		Tuple p = extended_gcd(b % a, a);
		int nx = p.y - p.x * (b / a);
		int ny = p.x;
		p.x = nx;
		p.y = ny;
		return p;
	}
	
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		PrintWriter pw = new PrintWriter(System.out);
		
		int n = sc.nextInt(), k = sc.nextInt();
		String s = sc.next();
		int length = n * k;
		
		int mod1 = (int)1e9+7;
		int[] p1 = new int[length];
		p1[0] = 1;
		for(int i = 1; i < length; i++)
			p1[i] = (int)((1l * p1[i - 1] * 31) % mod1);
		int[] inv1 = new int[length];
		for(int i = 0; i < length; i++) {
			int x = extended_gcd(p1[i], mod1).x;
			x = ((x % mod1) + mod1) % mod1;
			inv1[i] = x;
		}
		
		int mod2 = (int)1e9+9;
		int[] p2 = new int[length];
		p2[0] = 1;
		for(int i = 1; i < length; i++)
			p2[i] = (int)((1l * p2[i - 1] * 41) % mod2);
		int[] inv2 = new int[length];
		for(int i = 0; i < length; i++) {
			int x = extended_gcd(p2[i], mod2).x;
			x = ((x % mod2) + mod2) % mod2;
			inv2[i] = x;
		}
		
		TreeMap<Pair, Integer> g = new TreeMap<>();
		int m = sc.nextInt();
		for(int i = 0; i < m; i++) {
			String t = sc.next();
			int hash = 0;
			for(int j = 0; j < t.length(); j++) {
				int add = (int)((1l * (t.charAt(j) - 'a' + 1) * p1[j]) % mod1);
				hash = (int)((1l * add + hash) % mod1);
			}
			
			int hash1 = 0;
			for(int j = 0; j < t.length(); j++) {
				int add = (int)((1l * (t.charAt(j) - 'a' + 1) * p2[j]) % mod2);
				hash1 = (int)((1l * add + hash1) % mod2);
			}
			g.put(new Pair(hash, hash1), i + 1);
		}
		
		int[] hash1 = new int[length];
		hash1[0] = s.charAt(0) - 'a' + 1;
		for(int i = 1; i < length; i++)
			hash1[i] = (int)((1l * hash1[i - 1] + ((1l * (s.charAt(i) - 'a' + 1) * p1[i]) % mod1)) % mod1);
		int[] hash2 = new int[length];
		hash2[0] = s.charAt(0) - 'a' + 1;
		for(int i = 1; i < length; i++)
			hash2[i] = (int)((1l * hash2[i - 1] + ((1l * (s.charAt(i) - 'a' + 1) * p2[i]) % mod2)) % mod2);
		
		boolean flag = false;
		ArrayList<Integer> ans = new ArrayList<>();
		TreeSet<Pair> set = new TreeSet<>();
		for(int i = 0; i < k; i++) {
			ans = new ArrayList<>();
			set = new TreeSet<>();
			int u = i;
			for(int j = 0; j < n; j++) {
				int v = (u + k - 1) % length;
				int h1 = 0, h2 = 0;
				if(v >= u) {
					h1 = hash1[v] - (u == 0 ? 0 : hash1[u - 1]);
					h1 = ((h1 % mod1) + mod1) % mod1;
					h1 = (int)((1l * h1 * inv1[u]) % mod1);
					
					h2 = hash2[v] - (u == 0 ? 0 : hash2[u - 1]);
					h2 = ((h2 % mod2) + mod2) % mod2;
					h2 = (int)((1l * h2 * inv2[u]) % mod2);
				} else {
					int ha = hash1[length - 1] - (u == 0 ? 0 : hash1[u - 1]);
					ha = ((ha % mod1) + mod1) % mod1;
					ha = (int)((1l * ha * inv1[u]) % mod1);
					int hb = (int)((1l * hash1[v] * p1[length - u]) % mod1);
					h1 = (int)((1l * ha + hb) % mod1);
					
					ha = hash2[length - 1] - (u == 0 ? 0 : hash2[u - 1]);
					ha = ((ha % mod2) + mod2) % mod2;
					ha = (int)((1l * ha * inv2[u]) % mod2);
					hb = (int)((1l * hash2[v] * p2[length - u]) % mod2);
					h2 = (int)((1l * ha + hb) % mod2);
				}
				
				Pair p = new Pair(h1, h2);
				if(g.containsKey(p) && !set.contains(p)) {
					set.add(p);
					ans.add(g.get(p));
				} else
					break;
				u = v + 1;
			}
			if(ans.size() == n) {
				flag = true;
				break;
			}
		}
		
		if(flag) {
			pw.println("YES");
			for(int i = 0; i < n; i++)
				pw.print(ans.get(i) + (i == n - 1 ? "\n" : " "));
		} else {
			pw.println("NO");
		}
		
		pw.flush();
	}
	
	public static class Pair implements Comparable<Pair> {
		int a, b;
		
		public Pair(int a, int b) {
			this.a = a;
			this.b = b;
		}
		
		public int compareTo(Pair p) {
			if(this.a == p.a)
				return this.b - p.b;
			return this.a - p.a;
		}
	}
	
	public static class Tuple {
		int x, y, g;
		
		public Tuple(int x, int y, int g) {
			this.x = x;
			this.y = y;
			this.g = g;
		}
	}

	public static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public int[] nextIntArray(int n) throws IOException {
			int[] array = new int[n];
			for (int i = 0; i < n; i++)
				array[i] = nextInt();
			return array;
		}

		public Integer[] nextIntegerArray(int n) throws IOException {
			Integer[] array = new Integer[n];
			for (int i = 0; i < n; i++)
				array[i] = new Integer(nextInt());
			return array;
		}

		public long[] nextLongArray(int n) throws IOException {
			long[] array = new long[n];
			for (int i = 0; i < n; i++)
				array[i] = nextLong();
			return array;
		}

		public double[] nextDoubleArray(int n) throws IOException {
			double[] array = new double[n];
			for (int i = 0; i < n; i++)
				array[i] = nextDouble();
			return array;
		}

		public static int[] shuffle(int[] a) {
			int n = a.length;
			Random rand = new Random();
			for (int i = 0; i < n; i++) {
				int tmpIdx = rand.nextInt(n);
				int tmp = a[i];
				a[i] = a[tmpIdx];
				a[tmpIdx] = tmp;
			}
			return a;
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}
}