#include <iostream>

using namespace std;

int main()
{
	int x, y , n , a , b;
	cin >> x >> y;
	n = 1;
	b = 1;
	
	while (n <= x)
	{
		a = 0;
		if (n % 2 ==0)
		{
			if (b % 2 ==0)
			{
				cout << "#";
				while (a < y-1)
				{
					cout << "*";
					a++;
				}
			}
			else
			{
				while (a < y-1)
				{
					cout << "*";
					a++;
				}
				cout << "#";
			}
			b++;
			
		}
		else
		{
			while (a < y)
			{
				cout << "#";
				a++;
			}
		}
	cout << "\n";	
	n++;
	
	}

	return 0;
}