#include <iostream>
using namespace std;
int main() {
int x,y,arr[y];
cin >>x; cin>> y;
for(int i=0;i<y;i++){
arr[y]=i;
}
for(int j=0;j<=x;j++){
for(int k=0;k<y;k++){
cout<< "-";
}
if(x==1){cout << j; cout << "\n";if(j<y){cout << "-\n--\n-\n---\n-\n--\n-\n";
for(int s=0;s < y-1;s++){ cout<<"-";}
cout << "\n-\n--\n-\n---\n-\n--\n-\n";
for(int b=0;b<y;b++){
cout<< "-";
}
cout << j+1;
break;}}
else { cout << j; cout<< "\n";if(j<y-1){cout << "-\n--\n-\n---\n-\n--\n-\n";}}
}
return 0;
}