#include < iostream >
using namespace std;
int main()
{
int l,n,c,d,e,t;
cin>>t;
if(t<100){
for(e=0;e<t;e++){
cin>>l>>n;
if(l<100 && n<100){
for(c=0;c<l;c++)
{
for(d=0;d<n;d++)
{
if((c+d)%2==0)
{
cout<<"#";
}
else{
cout<<".";
}
}cout<<endl;
}
}
else{
return 0;
}
}}
return 0;
}