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:
// package StringHashing;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.HashSet;
import java.util.StringTokenizer;

public class GamesOnACD {
    public static void main(String[] args)throws IOException {
        BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st=new StringTokenizer(br.readLine());
        int n=Integer.parseInt(st.nextToken());
        int k=Integer.parseInt(st.nextToken());
        String str=br.readLine();
        int p1=31,p2=53,mod1=1000000009,mod2=1000000007;
        long prime1[]=new long[n*k];
        long prime2[]=new long[n*k];
        long invprime1[]=new long[n*k];
        long invprine2[]=new long[n*k];
        prime1[0]=1;prime2[0]=1;
        long invp1=modexp(p1,mod1-2,mod1);
        long invp2=modexp(p2,mod2-2,mod2);
        invprime1[0]=invprine2[0]=1;
        for(int i=1;i<n*k;i++){
            prime1[i]=(p1*prime1[i-1])%mod1;
            prime2[i]=(p2*prime2[i-1])%mod2;
            invprime1[i]=(invp1*invprime1[i-1])%mod1;
            invprine2[i]=(invp2*invprine2[i-1])%mod2;
        }
        HashMap<Long,HashSet<Integer>> map1=new HashMap<>();
        HashMap<Long,HashSet<Integer>> map2=new HashMap<>();
        int g=Integer.parseInt(br.readLine());
        for(int i=1;i<=g;i++){
            String s=br.readLine();
            long val1=0,val2=0;
            for(int j=0;j<k;j++){
                int t=s.charAt(j)-96;
                val1=(val1+t*prime1[j])%mod1;
                val2=(val2+t*prime2[j])%mod2;
            }
            HashSet<Integer> set1=map1.getOrDefault(val1,new HashSet<>());
            set1.add(i);
            HashSet<Integer> set2=map2.getOrDefault(val2,new HashSet<>());
            set2.add(i);
            map1.put(val1,set1);
            map2.put(val2,set2);
        }
        long hash1[]=new long[str.length()];
        long hash2[]=new long[str.length()];
        hash1[0]=hash2[0]=str.charAt(0)-96;
        for(int i=1;i<str.length();i++){
            int t=str.charAt(i)-96;
            long temp1=(t*prime1[i])%mod1;
            long temp2=(t*prime2[i])%mod2;
            hash1[i]=(hash1[i-1]+temp1)%mod1;
            hash2[i]=(hash2[i-1]+temp2)%mod2;
        }
        for(int i=0;i<k;i++){
            StringBuilder print=new StringBuilder();
            if(check(map1,map2,mod1,mod2,str.length(),i,print,hash1,hash2,invprime1,invprine2,n,k,
                    prime1,prime2)){
                System.out.println("YES");
                System.out.println(print.toString());
                return;
            }
//            System.out.println(i);
//            System.out.println(print.toString());
        }
        System.out.println("NO");
    }
    public static boolean check(HashMap<Long,HashSet<Integer>> map1,HashMap<Long,HashSet<Integer>> map2,
                                int mod1,int mod2,int len,int start,
                                StringBuilder print,long hash1[],long hash2[],
                                long invprime1[],long invprime2[],int n,int k,
                                long prime1[],long prime2[]){
        HashSet<Integer> set=new HashSet<>();
        for(int i=0;i<n;i++){
            int s=start+i*k;
            int e=s+k-1;
            long val1=getHash(len,s,e,hash1,invprime1,mod1,prime1);
            long val2=getHash(len,s,e,hash2,invprime2,mod2,prime2);
            if(map1.containsKey(val1)&&map2.containsKey(val2)){
                HashSet<Integer> set1=map1.get(val1);
                HashSet<Integer> set2=map2.get(val2);
                HashSet<Integer> temp=new HashSet<>();
                for(int t:set1){
                    if(set2.contains(t)){
                        temp.add(t);
                    }
                }
                boolean flag=false;
                for(int t:temp){
                    if(!set.contains(t)){
                        print.append(t+" ");
                        flag=true;
                        set.add(t);
                        break;
                    }
                }
                if(!flag){
                    return false;
                }
            }
            else{
                return false;
            }
        }
        return true;
    }
    public static long getHash(int len,int s,int e,long hash[],long invprime[],int mod,long prime[]){
        if(e<len){
            long ans;
            if(s>0)
                ans=(hash[e]-hash[s-1]+mod)%mod;
            else{
                return hash[e];
            }
            ans=(ans*invprime[s])%mod;
            return ans;
        }
        else{
            long ans1=getHash(len,s,len-1,hash,invprime,mod,prime);
            int part=len-s;
            int rem=(e-s+1)-part;
            long ans2=getHash(len,0,rem-1,hash,invprime,mod,prime);
            ans2=(ans2*prime[part])%mod;
            return (ans1+ans2)%mod;
        }
    }
    public static long modexp(long a,long pow,long mod){
        if(pow==0){
            return 1;
        }
        long small=modexp(a,pow/2,mod);
        long ans=(small*small)%mod;
        if(pow%2!=0){
            ans=(ans*a)%mod;
        }
        return ans;
    }
}