#include<iostream>
#include<string>
using namespace std;
int main(){
	int h,m;
	cin>>h,m;
	while(h==0||m==0)
		for(int i=1;i<=h;i++;){
			if((i%2)==1){
				int j=0;
				while(true){
					cout<<"#";
					j++;
					if(j>=m)break;
					cout<<",";
					j++;
					if(j>=m)break;
				}
			}
			else if((i%2)==0){
				int j=0;
				while(true){
					cout<<",";
					j++;
					if(j>=m)break;
					cout<<"#";
					j++;
					if(j>=m)break;
				}
			}
		}
	cin>>h,m;
	}
}

