#include <iostream>
#include <math.h>
using namespace std;
void printdashendl()
{
cout << "-" << endl;
}
void printdash()
{
cout << "-";
}
void loop(int n) {
if (n == 1)
return;
loop(n - 1);
for (int i = 0; i < n-1; i++)
printdash();
printdashendl();
printdashendl();
loop(n - 1);
}
int main() {
int n, b;
cin >> n >> b;
for (int i = 0; i <= n; i++) {
for (int j = 0; j < b; j++)
cout << "-";
cout << i << endl;
int count = 0;
if (i != n) {
printdashendl();
loop(b - 1);
}
}
}