#include <iostream>
#include <stdlib.h>
using namespace std ;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char** argv) {
int n;
while(cin>>n)
{
if(n==0) break;
for(int i=1; i<=n; i++)
cout<<string(n-i,'_')<<string(i,'+')<<'\n';
cout<<'\n';
}
return 0;
}