You are given two integers n and k.

Your task is to construct such a string s of length n that for each i from 1 to k there is at least one i-th letter of the Latin alphabet in this string (the first letter is 'a', the second is 'b' and so on) and there are no other letters except these. You have to maximize the minimal frequency of some letter (the frequency of a letter is the number of occurrences of this letter in a string). If there are several possible answers, you can print any.

You have to answer t independent queries.

Input

The first line of the input contains one integer t (1 ≤ t ≤ 100) — the number of queries.

The next t lines are contain queries, one per line. The i-th line contains two integers n_i and k_i (1 ≤ n_i ≤ 100, 1 ≤ k_i ≤ min(n_i, 26)) — the length of the string in the i-th query and the number of characters in the i-th query.

Output

Print t lines. In the i-th line print the answer to the i-th query: any string s_i satisfying the conditions in the problem statement with constraints from the i-th query.

Example

Input


3
7 3
4 4
6 2


Output


cbcacab
abcd
baabab

Note

In the first example query the maximum possible minimal frequency is 2, it can be easily seen that the better answer doesn't exist. Other examples of correct answers: "cbcabba", "ccbbaaa" (any permutation of given answers is also correct).

In the second example query any permutation of first four letters is acceptable (the maximum minimal frequency is 1).

In the third example query any permutation of the given answer is acceptable (the maximum minimal frequency is 3).
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class GFGss
{
    static int mod1 = (int) (1e9 + 7);
    static class Reader
    {
        final private int BUFFER_SIZE = 1 << 16;
        Scanner scan = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer, bytesRead;

        public Reader()
        {
            din = new DataInputStream(System.in);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Reader(String file_name) throws IOException
        {
            din = new DataInputStream(new FileInputStream(file_name));
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }
        public String nextString() throws IOException
        {
            String str00=scan.next();
            return str00;
        }
        public String readLine() throws IOException
        {
            byte[] buf = new byte[64]; // line length
            int cnt = 0, c;
            while ((c = read()) != -1)
            {
                if (c == '\n')
                    break;
                buf[cnt++] = (byte) c;
            }
            return new String(buf, 0, cnt);
        }

        public int nextInt() throws IOException
        {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        public long nextLong() throws IOException
        {
            long ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do
            {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');
            if (neg)
                return -ret;
            return ret;
        }

        public double nextDouble() throws IOException
        {
            double ret = 0, div = 1;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();

            do
            {
                ret = ret * 10 + c - '0';
            }
            while ((c = read()) >= '0' && c <= '9');

            if (c == '.')
            {
                while ((c = read()) >= '0' && c <= '9')
                {
                    ret += (c - '0') / (div *= 10);
                }
            }

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() throws IOException
        {
            bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() throws IOException
        {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

        public void close() throws IOException
        {
            if (din == null)
                return;
            din.close();
        }

        public int[] nextArray(int n) throws IOException
        {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
            {
                a[i] = nextInt();
            }
            return a;
        }
    }
    static boolean primeCheck(long num0)
    {
        boolean b1 = true;
        if(num0==1)
        {
            b1=false;
        }
        else
        {
            int num01 = (int) (Math.sqrt(num0)) + 1;
            me1: for (int i = 2; i < num01; i++)
            {
                if (num0 % i == 0)
                {
                    b1 = false;
                    break me1;
                }
            }
        }
        return b1;
    }
    static HashSet<Integer> primeDivisor(HashSet<Integer> hSet0,int num0)
    {
        boolean b1=primeCheck(num0);
        if(b1)
        {
            hSet0.add(num0);
        }
        else
        {
            for(int i=2;i*i<=num0;i++)
            {
                if(num0%i==0)
                {
                    hSet0.add(i);
                    while(num0%i==0)
                    {
                        num0 /= i;
                    }
                }
            }
            boolean b2=primeCheck(num0);
            if(b2)
            {
                hSet0.add(num0);
            }
        }
        return hSet0;
    }

    static long GCD (long num0,long num00)
    {
        BigInteger big1=BigInteger.valueOf(num0);
        BigInteger big2=BigInteger.valueOf(num00);
        big1=big1.gcd(big2);
        long num000=Long.parseLong(big1.toString());
        return num000;
    }

    static long power1 (long num0,long num00)
    {
        long res1 = 1;
        while (num00 > 0)
        {
            if (num00 % 2 != 0)
            {
                res1 = (res1 * (num0 % 100006)) % 1000016;
            }
            num0 *= num0;
            num0 %= 1000016;
            num00 /= 2;
        }
        return res1;
    }

    static HashSet<Integer> primeDivi(int num0)
    {
        HashSet<Integer> hSet1=new HashSet<>();
        int num00=(int)Math.sqrt(num0);
        hSet1.add(1);
        for(int i=2;i<num00+1;i++)
        {
            if(num0%i==0)
            {
                hSet1.add(i);
                hSet1.add(num0/i);
            }
        }
        return hSet1;
    }

    static long gcd(long num0,long num00)
    {
        if(num00==0)
        {
            return num0;
        }
        return gcd(num00,num0%num00);
    }

    static boolean findChar(char chr0,char[] chrArr0)
    {
        int len0=chrArr0.length;
        boolean bool0=false;
        me0: for(int i=0;i<len0;i++)
        {
            if(chrArr0[i]==chr0)
            {
                bool0=true;
                break me0;
            }
        }

        return bool0;
    }

    public static void main(String[] args) throws IOException {
        Reader r = new Reader();
        //PrintWriter writer=new PrintWriter(System.out);
        //Scanner r = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        OutputWriter33 out33=new OutputWriter33(System.out);

        int cas1=r.nextInt();
        char[] chrArr1=new char[26];
        char first0='a';
        for(int i=0;i<26;i++)
        {
            chrArr1[i]=first0;
            first0++;
        }
        while(cas1-->0)
        {
            int num1=r.nextInt();
            int num2=r.nextInt();

            String ans1="";
            int num3=num1/num2;
            int num5=num1%num2;

            for(int i=0;i<num3;i++)
            {
                for(int j=0;j<num2;j++)
                {
                    ans1+=chrArr1[j];
                }
            }

            for(int i=0;i<num5;i++)
            {
                ans1+="a";
            }

            out33.print(ans1+"\n");
        }

        out33.close();
        r.close();
    }
}
class OutputWriter33
{
    BufferedWriter writer;

    public OutputWriter33(OutputStream stream)
    {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException
    {
        writer.write(i + "");
    }

    public void println(int i) throws IOException
    {
        writer.write(i + "\n");
    }

    public void print(String s) throws IOException
    {
        writer.write(s + "");
    }

    public void println(String s) throws IOException
    {
        writer.write(s + "\n");
    }

    public void print(char[] c) throws IOException
    {
        writer.write(c);
    }

    public void close() throws IOException
    {
        writer.flush();
        writer.close();
    }
}

