#include<iostream>
using namespace std;
int main()
{
int t,n,k,i;
cin>>t;
while(t--)
{
cin>>n>>k;
if(n==1)
{
if(k==1)
cout<<"1"<<endl;
else
cout<<"-1"<<endl;
}
else
{
if(k>n/2)
cout<<"-1"<<endl;
else {
for(i=1;i<=k;i++)
{
cout<<(i<<1);
}cout<<endl;
}
}
}
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCBtYWluKCkKewogICAgaW50IHQsbixrLGk7CiAgICBjaW4+PnQ7CiAgICB3aGlsZSh0LS0pCiAgICB7CiAgICAgICAgY2luPj5uPj5rOwoKICAgICAgICBpZihuPT0xKQogICAgICAgIHsKICAgICAgICBpZihrPT0xKQogICAgICAgIGNvdXQ8PCIxIjw8ZW5kbDsKICAgICAgICBlbHNlCiAgICAgICAgY291dDw8Ii0xIjw8ZW5kbDsKICAgICAgICB9CiAgICAgICAgZWxzZQogICAgICAgIHsKCiAgICAgICAgaWYoaz5uLzIpCiAgICAgICAgY291dDw8Ii0xIjw8ZW5kbDsKICAgICAgICBlbHNlIHsKCiAgICAgICAgZm9yKGk9MTtpPD1rO2krKykKICAgICAgICB7CiAgICAgICAgICAgIGNvdXQ8PChpPDwxKTsKCgoKICAgICAgICB9Y291dDw8ZW5kbDsKICAgICAgICB9CiAgICAgICAgfQoKCgogICAgfQogICAgcmV0dXJuIDA7Cn0=