int main(void) {
int n = 0, m = 0;
int i = 0, j = 0;
scanf("%d %d", &n, &m);
for (i = 0; i < n; i++)
{
for (j = 0; j < m; j++)
{
printf("+---");
}
printf("+ ");
for (j = 0; j < m; j++)
{
printf("| ");
}
printf("| ");
}
for (j = 0; j < m; j++)
{
printf("+---");
}
printf("+ ");
return EXIT_SUCCESS;
}