#include <bits/stdc++.h>
using namespace std;
long long n, cnt = 2, t = 0;
int main() {
cin >> n;
for (long long i = 1; i <= n; i++) {
for (long long j = 1; j <= n; j++) {
if (j == 1 || j == n) {
cout << "+";
continue;
} else if ((i >= 2 && i <= n - 1) || j == cnt) {
cout << "+";
t = 1;
continue;
} else {
cout << "-";
continue;
}
}
if (t = 1) {
cnt++;
t = 0;
}
puts(" ");
}
return 0;
}
求求了,真不知道错哪(哭)
TAT