#include <iostream>
using namespace std;
int main()
{
int n , m , u ;
cin >> n >> m;
u = 1;
for ( int i = 0 ; i < n ; i ++ )
{
int l = u / 2;
if ( u % 2 == 1 )
{
for ( int g = 0 ; g < m ; g ++ )
{
cout <<"#";
}
}
else if ( l % 2 == 1 )
{
for ( int r = 0 ; r < m - 1 ; r ++ )
{
cout <<"*";
}
cout <<"#";
}
else
{
cout <<"#";
for ( int k = 0 ; k < m - 1 ; k ++ )
{
cout <<"*";
}
}
u ++;
cout <<'\n';
}
return 0;
}