#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
    int n;
    int a[100010];
    cin>>n;
    int sum=0;
        for(int i=1;i<=n;i++)
        cin>>a[i],sum+=a[i];
        sum-=a[n];
        if(n==1)
        cout<<"+\n";
        else if(sum>a[n])
        {
            for(int i=1;i<n;i++)
            cout<<"+";
            cout<<"-\n";
        }
        else
        {
            for(int i=1;i<n;i++)
            cout<<"-";
            cout<<"+\n";
        }
    return 0;
}


#include<cstdio>
#include<cstdlib>
using namespace std;
const long long MAXN=100100;
long long N,A[MAXN];
bool condition[MAXN],indicator;
void readImput()
{
    int i;
    scanf("%I64d",&N);
    for(i=1;i<=N;i++)
    scanf("%I64d",&A[i]);
}
void setConditions()
{
    long long i,sum;
    sum=0;
    for(i=N;i>=1;i--)
    {
        if(sum>=0)sum-=A[i];
        else
        if(sum<0)
        {
            condition[i]=true;
            sum+=A[i];
        }
    }
    if(sum<0)indicator=true;
}
void printOutput()
{
    int i;
    for(i=1;i<=N;i++)
    {
        if(indicator)condition[i]=condition[i]^1;
        if(condition[i])printf("+");
        else
        if(!condition[i])printf("-");
    }
    printf("\n");
}
int main()
{
    readImput();
    setConditions();
    printOutput();
}


#include<cstdio>
#include<cstdlib>
using namespace std;
const long long MAXN=100100;
long long N,A[MAXN];
bool condition[MAXN],indicator;
void readImput()
{
    int i;
    scanf("%I64d",&N);
    for(i=1;i<=N;i++)
    scanf("%I64d",&A[i]);
}
void setConditions()
{
    long long i,sum;
    sum=0;
    for(i=1;i<N;i++)
    sum-=A[i];
    sum+=A[N];
    condition[N]=true;
    i=1;
    while(abs(sum)>A[1])
    {
        sum+=2*A[i];
        condition[i]=true;
        i++;
    }
    if(sum<0)indicator=true;
}
void printOutput()
{
    int i;
    for(i=1;i<=N;i++)
    {
        if(indicator)condition[i]=condition[i]^1;
        if(condition[i])printf("+");
        else
        if(!condition[i])printf("-");
    }
    printf("\n");
}
int main()
{
    readImput();
    setConditions();
    printOutput();
}


#include<cstdio>
#include<cstdlib>
using namespace std;
const long long MAXN=100100;
long long N,A[MAXN];
bool condition[MAXN],indicator;
void readImput()
{
    int i;
    scanf("%I64d",&N);
    for(i=1;i<=N;i++)
    scanf("%I64d",&A[i]);
}
void setConditions()
{
    long long i,sum;
    sum=0;
    for(i=1;i<N;i++)
    sum-=A[i];
    sum+=A[N];
    condition[N]=true;
    i=1;
    while(abs(sum)>A[1])
    {
        sum+=A[i];
        condition[i]=true;
        i++;
    }
    if(sum<0)indicator=true;
}
void printOutput()
{
    int i;
    for(i=1;i<=N;i++)
    {
        if(indicator)condition[i]=condition[i]^1;
        if(condition[i])printf("+");
        else
        if(!condition[i])printf("-");
    }
    printf("\n");
}
int main()
{
    readImput();
    setConditions();
    printOutput();
}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

string sign;

int main(){

    int n;
    S("%d",&n);
    REP(i,n)
     S("%d",&a[i]);

    long long sum=0;

    sign='+';

    sum=a[n-1];

    FORD(i,n-2,0)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

    sign='-';

    sum=-a[n-1];

    FORD(i,n-2,0)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

string sign;

int main(){

    int n;
    S("%d",&n);
    REP(i,n)
     S("%d",&a[i]);

    long long sum=0;

    sign='+';

    sum=a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign+='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

    sign='-';

    sum=-a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign+='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

string sign;

int main(){

    int n;
    S("%d",&n);
    REP(i,n)
     S("%d",&a[i]);

    long long sum=0;

    sign='+';

    sum=a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

    sign='-';

    sum=-a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

long long b[MAXN];

int main(){

    int n;
    S("%d",&n);

    long long sum=0;

    REP(i,n)
    {
        S("%d",&a[i]);
        sum+=(long long)(a[i]);
        b[i]=sum;
    }

    REP(i,n)
    {
        long long tmp=2*b[i]-sum;
        if( tmp>=0 && tmp<=a[0] )
        {
            REP(j,i+1)
             P("+");
            REP(j,n-i-1)
             P("-");
            return 0;
        }
    }

    REP(i,n)
    {
        long long tmp=sum-2*b[i];
        if( tmp>=0 && tmp<=a[0] )
        {
            REP(j,i+1)
             P("-");
            REP(j,n-i-1)
             P("+");
            return 0;
        }
    }

}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

string sign;

int main(){

    int n;
    S("%d",&n);
    REP(i,n)
     S("%d",&a[i]);

    long long sum=0;

    sign='+';

    sum=a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

    sign='-';

    sum=-a[n-1];

    FORD(i,n-2,1)
    {
        if(sum<=0) sum+=(long long)(a[i]),sign+='+';
        else sum-=(long long)(a[i]),sign+='-';
    }

    if(sum-a[0]<0) sum+=(long long)(a[0]),sign+='+';
    else sum-=(long long)(a[0]),sign+='-';

    if( sum>=0 && sum<=a[0] )
    {
        reverse(sign.begin(),sign.end());
        cout << sign;
        return 0;
    }

}


/*
  ------------------------- Hachiikung ---------------------------------
  ---------------------- Worrachate Bosri ------------------------------
  ------ Faculty of Computer Engineering Chulalongkorn University ------
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include<utility>
#include<sstream>
using namespace std;
#define REP(i,FN) for(int i=0;i<FN;i++)
#define FOR(i,ST,FN) for(int i=ST;i<=FN;i++)
#define FORD(i,FN,ST) for(int i=FN;i>=ST;i--)
#define FORX(x) for(it=x.begin();it!=x.end();it++)
#define pause system("pause")
#define S scanf
#define P printf
#define X first
#define Y second
#define pb push_back
#define PII pair<int,int>

const int MOD(1000000007);
const int INF((1<<30)-1);
const int MAXN(100005);

int a[MAXN];

bool chk[MAXN]={0};

int main(){

    int n;
    S("%d",&n);

    long long sum=0;

    REP(i,n)
    {
        S("%d",&a[i]);
        sum-=a[i];
    }

    FORD(i,n-1,0)
    {
        sum+=2*a[i];

        if( sum>=0 && sum<=a[0] )
        {
            chk[i]=1;
            break;
        }

        else if( sum<0 ) chk[i]=1;

        else sum-=2*a[i];

    }

    if( sum>=0 && sum<=a[0] )
    {
        REP(i,n)
         if(chk[i]) P("+");
         else P("-");
    }
    else
    {
        REP(i,n)
         if(chk[i]) P("-");
         else P("+");
    }

}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];
int fora[100010], Nfora;
int dentro[100010], Ndentro;

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    ll v0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        if (i==0) v0 = v[0];
        S += (ll)v[i];
        fora[i] = i;
        v[i] *= 2;
    }
    Nfora = n;
    Ndentro = 0;
    ll soma = 0;
    while (!(S-v0 <= soma and soma <= S)) {
        if (soma > S) {
            int t = rand()%3; //Ndentro;
            t = max(0,Ndentro-1-t);
            soma -= (ll)v[ dentro[t] ];
            fora[Nfora++] = dentro[t];
            dentro[t] = dentro[Ndentro-1];
            Ndentro--;
        }
        else {
            int t = rand()%Nfora;
            soma += (ll)v[ fora[t] ];
            dentro[Ndentro++] = fora[t];
            fora[t] = fora[Nfora-1];
            Nfora--;
        }
    }
    memset(r,'+',sizeof(r));
    for (int i=0;i<Ndentro;i++)
        r[dentro[i]]='-';
    for (int i=0;i<n;i++)
        printf("%c",r[i]);
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];
int fora[100010], Nfora;
int dentro[100010], Ndentro;

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    ll v0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        if (i==0) v0 = v[0];
        S += (ll)v[i];
        fora[i] = i;
        v[i] *= 2;
    }
    Nfora = n;
    Ndentro = 0;
    ll soma = 0;
    while (!(S-v0 <= soma and soma <= S)) {
        if (soma > S) {
            int t = rand()%Ndentro;
            soma -= (ll)v[ dentro[t] ];
            fora[Nfora++] = dentro[t];
            dentro[t] = dentro[Ndentro-1];
            Ndentro--;
        }
        else {
            int t = rand()%Nfora;
            soma += (ll)v[ fora[t] ];
            dentro[Ndentro++] = fora[t];
            fora[t] = fora[Nfora-1];
            Nfora--;
        }
    }
    memset(r,'+',sizeof(r));
    for (int i=0;i<Ndentro;i++)
        r[dentro[i]]='-';
    for (int i=0;i<n;i++)
        printf("%c",r[i]);
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    ll v0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        if (i==0) v0 = v[0];
        S += (ll)v[i];
    }
    ll l1 = (S-v0+1)/2;
    ll l2 = S/2;
    ll soma = 0;
    multiset<ll> dentro;
    multiset<ll>::iterator Si;
    for (int i=0;i<n;i++) {
        if (l1 <= soma and soma <= l2) break;
        soma += (ll)v[i];
        dentro.insert(v[i]);
        while (soma > l2) {
            ll cara = soma-l1;
            Si = dentro.lower_bound(cara);
            if (Si != dentro.begin() and !(Si != dentro.end() and *Si == cara)) Si--;
            soma -= *Si;
            dentro.erase(Si);
        }
    }

    for (int i=0;i<n;i++) {
        Si = dentro.lower_bound(v[i]);
        if (Si != dentro.end() and *Si == v[i]) {
            printf("-");
            dentro.erase(Si);
        } else
            printf("+");
    }
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];
int fora[100010], Nfora;
int dentro[100010], Ndentro;

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        S += (ll)v[i];
        fora[i] = i;
        v[i] *= 2;
    }
    Nfora = n;
    Ndentro = 0;
    ll soma = 0;
    while (!(S-v[0] <= soma and soma <= S)) {
        if (soma > S) {
            int t = rand()%Ndentro;
            soma -= (ll)v[ dentro[t] ];
            fora[Nfora++] = dentro[t];
            dentro[t] = dentro[Ndentro-1];
            Ndentro--;
        }
        else {
            int t = rand()%Nfora;
            soma += (ll)v[ fora[t] ];
            dentro[Ndentro++] = fora[t];
            fora[t] = fora[Nfora-1];
            Nfora--;
        }
    }
    memset(r,'+',sizeof(r));
    for (int i=0;i<Ndentro;i++)
        r[dentro[i]]='-';
    for (int i=0;i<n;i++)
        printf("%c",r[i]);
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];
int fora[100010], Nfora;
int dentro[100010], Ndentro;

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        S += (ll)v[i];
        fora[i] = i;
        v[i] *= 2;
    }
    Nfora = n;
    Ndentro = 0;
    ll soma = 0;
    while (!(S-v[0] <= soma and soma <= S)) {
        if (soma > S) {
            int t = rand()%Ndentro;
            soma -= (ll)v[ dentro[t] ];
            fora[Nfora++] = dentro[t];
            dentro[t] = dentro[Ndentro-1];
            Ndentro--;
        }
        else {
            int t = rand()%Nfora;
            soma += (ll)v[ fora[t] ];
            dentro[Ndentro++] = fora[t];
            fora[t] = fora[Nfora-1];
            Nfora--;
        }
    }
    memset(r,'+',sizeof(r));
    for (int i=0;i<Ndentro;i++)
        r[dentro[i]]='-';
    for (int i=0;i<n;i++)
        printf("%c",r[i]);
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    ll v0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        if (i==0) v0 = v[0];
        S += (ll)v[i];
    }
    ll l1 = (S-v0+1)/2;
    ll l2 = S/2;
    ll soma = 0;
    multiset<ll> dentro;
    multiset<ll>::iterator Si;
    for (int i=0;i<n;i++) {
        if (l1 <= soma and soma <= l2) break;
        soma += (ll)v[i];
        dentro.insert(v[i]);
        if (soma > l2) {
            ll cara = soma-l1;
            Si = dentro.lower_bound(cara);
            if (Si != dentro.begin() and !(Si != dentro.end() and *Si == cara)) Si--;
            soma -= *Si;
            dentro.erase(Si);
        }
    }

    for (int i=0;i<n;i++) {
        Si = dentro.lower_bound(v[i]);
        if (Si != dentro.end() and *Si == v[i]) {
            printf("-");
            dentro.erase(Si);
        } else
            printf("+");
    }
    printf("\n");

    return 0;
}


#include <cstdio>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <algorithm>
#include <set>
#include <map>

#define ll long long int
#define min(a, b) (a < b ? a : b)
#define max(a, b) (a > b ? a : b)

using namespace std;

typedef pair<int,int> ii;

int n, v[100010];
char r[100010];
int dentro[100010], Ndentro;
int fora[100010], Nfora;

int main() {

    /*printf("100000\n");
    for (int i=0;i<100000;i++)
        printf("1 ");
    printf("\n");
    return 0;*/

    srand(time(NULL));
    scanf("%d",&n);
    ll S = 0;
    ll v0;
    for (int i=0;i<n;i++) {
        scanf("%d",v+i);
        if (i==0) v0 = v[0];
        S += (ll)v[i];
    }
    ll l1 = (S-v0+1)/2ll;
    ll l2 = S/2ll;
    ll soma = 0;
    multiset<ll> Sdentro;
    multiset<ll>::iterator Si;
    for (int i=0;i<n;i++) {
        if (l1 <= soma and soma <= l2) break;
        soma += (ll)v[i];
        Sdentro.insert(v[i]);
        while (soma > l2) {
            ll cara = soma-l1;
            Si = Sdentro.lower_bound(cara);
            if (Si != Sdentro.begin() and !(Si != Sdentro.end() and *Si == cara)) Si--;
            soma -= *Si;
            Sdentro.erase(Si);
        }
    }

    Nfora=Ndentro=0;
    soma = 0;
    for (int i=0;i<n;i++) {
        Si = Sdentro.lower_bound(v[i]);
        if (Si != Sdentro.end() and *Si == v[i]) {
            dentro[Ndentro++] = i;
            Sdentro.erase(Si);
            soma += v[i];
        } else
            fora[Nfora++] = i;
    }

    while (!(l1 <= soma and soma <= l2)) {
        if (soma > l2) {
            int t = rand()%Ndentro;
            soma -= (ll)v[ dentro[t] ];
            fora[Nfora++] = dentro[t];
            dentro[t] = dentro[Ndentro-1];
            Ndentro--;
        }
        else {
            int t = rand()%Nfora;
            soma += (ll)v[ fora[t] ];
            dentro[Ndentro++] = fora[t];
            fora[t] = fora[Nfora-1];
            Nfora--;
        }
    }
    memset(r,'+',sizeof(r));
    for (int i=0;i<Ndentro;i++)
        r[dentro[i]]='-';
    for (int i=0;i<n;i++)
        printf("%c",r[i]);
    printf("\n");

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define ll 		long long
#define mp 		make_pair
#define sz(v) 	(int)v.size()
#define pb    	push_back
#define b_p(n)		__builtin_popcount(n)
#define s second
#define f first
#define ull unsigned long long

vector<int> v;
map<pair<ull, int>, ull > vis;
ull fun(ull S, ull s, int idx) {
	if (S - s < 0)
		return (ll) 9999999999999999;
	if (idx == sz(v))
		return vis[mp(S, idx)] = (S - s);
	if (vis[mp(S, idx)])
		return vis[mp(S, idx)];
	return vis[mp(S, idx)] = min(fun(S - v[idx], s + v[idx], idx + 1),
			fun(S, s, idx + 1));
}
bool visited[100009];
void build(ull S, ull s, int idx) {
	if (idx == sz(v))
		return;
	if (!vis.count(mp(S - v[idx], idx + 1)))
		vis[mp(S - v[idx], idx + 1)] = 9999999999999999;
	if (!vis.count(mp(S, idx + 1)))
		vis[mp(S, idx + 1)] = 9999999999999999;

	if (vis[mp(S - v[idx], idx + 1)] > vis[mp(S, idx + 1)])
		build(S, s, idx + 1);
	else {
		visited[idx] = 1;
		build(S - v[idx], s + v[idx], idx + 1);
	}
}
int main() {
	int n;
	ull t = 0;
	cin >> n;
	v.resize(n);
	for (int i = 0; i < n; i++)
		cin >> v[i], t += v[i];
	sort(v.begin() + 1, v.end());
	t -= v[0];
	fun(t, 0, 1);
	build(t, 0, 1);
	cout << "+";
	for (int i = 1; i < n; i++)
		if (visited[i])
			cout << "+";
		else
			cout << "-";
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define ll 		long long
#define mp 		make_pair
#define sz(v) 	(int)v.size()
#define pb    	push_back
#define b_p(n)		__builtin_popcount(n)
#define s second
#define f first
#define ull unsigned long long

vector<int> v;
map<pair<ull, int>, ull > vis;
ull fun(ull S, ull s, int idx) {
	if (S - s < 0)
		return (ll) 9999999999999999;
	if (idx == sz(v))
		return vis[mp(S, idx)] = (S - s);
	if (vis[mp(S, idx)])
		return vis[mp(S, idx)];
	return vis[mp(S, idx)] = min(fun(S - v[idx], s + v[idx], idx + 1),
			fun(S, s, idx + 1));
}
bool visited[100009];
void build(ull S, ull s, int idx) {
	if (idx == sz(v))
		return;
	if (!vis.count(mp(S - v[idx], idx + 1)))
		vis[mp(S - v[idx], idx + 1)] = 9999999999999999;
	if (!vis.count(mp(S, idx + 1)))
		vis[mp(S, idx + 1)] = 9999999999999999;

	if (vis[mp(S - v[idx], idx + 1)] > vis[mp(S, idx + 1)])
		build(S, s, idx + 1);
	else {
		visited[idx] = 1;
		build(S - v[idx], s + v[idx], idx + 1);
	}
}
int main() {
	int n;
	ull t = 0;
	cin >> n;
	v.resize(n);
	for (int i = 0; i < n; i++)
		cin >> v[i], t += v[i];
	sort(v.begin() + 1, v.end());
	t -= v[0];
	ull deff = fun(t, 0, 1);
	build(t, 0, 1);
	if (deff < (ull) v[0]) {
		cout << "+";
		for (int i = 1; i < n; i++)
			if (visited[i])
				cout << "+";
			else
				cout << "-";
	} else {
		cout << "-";
		for (int i = 1; i < n; i++)
			if (visited[i])
				cout << "-";
			else
				cout << "+";

	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

#define ll 		long long
#define mp 		make_pair
#define sz(v) 	(int)v.size()
#define pb    	push_back
#define b_p(n)		__builtin_popcount(n)
#define s second
#define f first
#define ull unsigned long long

char res[100009];

void fill(char c, vector<int> &v) {
	for (int i = 0; i < sz(v); i++)
		res[v[i]] = c;
}
int main() {
	int n;
	ll t1 = 0, t2 = 0;
	vector<int> ind1, ind2;
	cin >> n;
	vector<int> v(n);
	for (int i = 0; i < n; i++)
		cin >> v[i];
	for (int i = n - 1; i >= 0; i--) {
		if (t1 <= t2)
			t1 += v[i], ind1.pb(i);
		else
			t2 += v[i], ind2.pb(i);
	}
	if (t1 >= t2) {
		fill('+', ind1);
		fill('-', ind2);
	} else {
		fill('-', ind1);
		fill('+', ind2);
	}
	res[n] = '\0';
	printf("%s\n", res);
//	cout << t1-t2 << endl;
	return 0;
}


#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable:4786)

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <ctime>
#include <bitset>
#include <vector>
#include <cstdio>
#include <cctype>
#include <string>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX_SIZE 100100
#define MAX_LENGTH 100100
#define INF ( 1 << 29 )

#define CLR( a ) memset( a , NULL , sizeof( a ) )
#define MEM( a ) memset( a , -1 , sizeof( a ) )
#define fort( a , b ) for( ind = ( a ); ind <= ( b ); ind++ )
#define foriab( a , b ) for( i = ( a ); i < ( b ); i++ )
#define fori( a ) for( i = 0; i < ( a ); i++ )
#define forj( a ) for( j = 0; j < ( a ); j++ )
#define print1( a ) printf( "%I64d ---\n" , ( a ) )
#define print2( a , b ) printf( "%I64d %I64d ---\n" , ( a ) , ( b ) )

typedef __int64 lll ;

int MIN( int a , int b ) { return a < b ? a : b ; }
int MAX( int a , int b ) { return a > b ? a : b ; }
int GCD( int a , int b ) { while( b ) b ^= a ^= b ^= a %= b ; return a ; }
int LCM( int a , int b ) { return a * ( b / GCD( a , b ) ) ; }
void SWAP( int &a , int &b ) { a = a ^ b ; b = a ^ b ; a = a ^ b ; }

const double PI = acos( -1 ) ;
const double EPS = 1e-11 ;

lll arr[ MAX_LENGTH ] , brr[ MAX_LENGTH ] , crr[ MAX_LENGTH ] , drr[ MAX_LENGTH ] , err[ MAX_LENGTH ] ;

int main() {
    //freopen( "D.in" , "r" , stdin ) ;
	//freopen( "out.txt" , "w" , stdout ) ;
	lll T , res , n , i , ind , a , b , c , j , d , tot , x ;
	while( scanf( "%I64d" , &n ) != EOF ) {
        CLR( arr ) ;
        CLR( brr ) ;
        CLR( crr ) ;
        CLR( drr ) ;
        set< lll > S ;
        set< lll > :: iterator it ;
        tot = 0 ;
        fori( n ) {
            scanf( "%I64d" , &arr[ i ] ) ;
            tot += arr[ i ] ;
        }
        d = tot / 2 ;
        a = 0 ;
        for( i = n - 1 ; i >= 0 ; i-- ) {
            if( a < 0 ) {
                a += arr[ i ] ;
                drr[ i ] = 0 ;
            }
            else {
                a -= arr[ i ] ;
                drr[ i ] = 1 ;
            }
        }
        if( a < 0 ) {
            x = 1 ;
        }
        else {
            x = 0 ;
        }
        for( i = 0 ; i < n ; i++ ) {
            if( drr[ i ] == x ) {
                printf( "+" ) ;
            }
            else {
                printf( "-" ) ;
            }
        }
		printf( "\n" ) ;
	}
	return 0 ;
}


#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable:4786)

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <ctime>
#include <bitset>
#include <vector>
#include <cstdio>
#include <cctype>
#include <string>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX_SIZE 100100
#define MAX_LENGTH 100100
#define INF ( 1 << 29 )

#define CLR( a ) memset( a , NULL , sizeof( a ) )
#define MEM( a ) memset( a , -1 , sizeof( a ) )
#define fort( a , b ) for( ind = ( a ); ind <= ( b ); ind++ )
#define foriab( a , b ) for( i = ( a ); i < ( b ); i++ )
#define fori( a ) for( i = 0; i < ( a ); i++ )
#define forj( a ) for( j = 0; j < ( a ); j++ )
#define print1( a ) printf( "%I64d ---\n" , ( a ) )
#define print2( a , b ) printf( "%I64d %I64d ---\n" , ( a ) , ( b ) )

typedef __int64 lll ;

int MIN( int a , int b ) { return a < b ? a : b ; }
int MAX( int a , int b ) { return a > b ? a : b ; }
int GCD( int a , int b ) { while( b ) b ^= a ^= b ^= a %= b ; return a ; }
int LCM( int a , int b ) { return a * ( b / GCD( a , b ) ) ; }
void SWAP( int &a , int &b ) { a = a ^ b ; b = a ^ b ; a = a ^ b ; }

const double PI = acos( -1 ) ;
const double EPS = 1e-11 ;

lll arr[ MAX_LENGTH ] , brr[ MAX_LENGTH ] , crr[ MAX_LENGTH ] , drr[ MAX_LENGTH ] , err[ MAX_LENGTH ] ;

int main() {
    //freopen( "D.in" , "r" , stdin ) ;
	//freopen( "out.txt" , "w" , stdout ) ;
	lll T , res , n , i , ind , a , b , c , j , d , tot ;
	while( scanf( "%I64d" , &n ) != EOF ) {
        CLR( arr ) ;
        CLR( brr ) ;
        CLR( crr ) ;
        CLR( drr ) ;
        set< lll > S ;
        set< lll > :: iterator it ;
        tot = 0 ;
        fori( n ) {
            scanf( "%I64d" , &arr[ i ] ) ;
            tot += arr[ i ] ;
        }
        d = tot / 2 ;
        a = 0 ;
        for( i = n - 1 ; i >= 0 ; i-- ) {
            if( a < 0 ) {
                a += arr[ i ] ;
                drr[ i ] = 0 ;
            }
            else {
                a -= arr[ i ] ;
                drr[ i ] = 1 ;
            }
        }
        for( i = 0 ; i < n ; i++ ) {
            if( drr[ i ] == 0 ) {
                printf( "+" ) ;
            }
            else {
                printf( "-" ) ;
            }
        }
		printf( "\n" ) ;
	}
	return 0 ;
}


#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable:4786)

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <ctime>
#include <bitset>
#include <vector>
#include <cstdio>
#include <cctype>
#include <string>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX_SIZE 100100
#define MAX_LENGTH 100100
#define INF ( 1 << 29 )

#define CLR( a ) memset( a , NULL , sizeof( a ) )
#define MEM( a ) memset( a , -1 , sizeof( a ) )
#define fort( a , b ) for( ind = ( a ); ind <= ( b ); ind++ )
#define foriab( a , b ) for( i = ( a ); i < ( b ); i++ )
#define fori( a ) for( i = 0; i < ( a ); i++ )
#define forj( a ) for( j = 0; j < ( a ); j++ )
#define print1( a ) printf( "%d ---\n" , ( a ) )
#define print2( a , b ) printf( "%d %d ---\n" , ( a ) , ( b ) )

typedef __int64 lll ;

int MIN( int a , int b ) { return a < b ? a : b ; }
int MAX( int a , int b ) { return a > b ? a : b ; }
int GCD( int a , int b ) { while( b ) b ^= a ^= b ^= a %= b ; return a ; }
int LCM( int a , int b ) { return a * ( b / GCD( a , b ) ) ; }
void SWAP( int &a , int &b ) { a = a ^ b ; b = a ^ b ; a = a ^ b ; }

const double PI = acos( -1 ) ;
const double EPS = 1e-11 ;

int arr[ MAX_LENGTH ] , brr[ MAX_LENGTH ] , crr[ MAX_LENGTH ] ;

int main() {
    //freopen( "D.in" , "r" , stdin ) ;
	//freopen( "out.txt" , "w" , stdout ) ;
	int T , res , n , i , ind , a , b , c , j , d ;
	while( scanf( "%d" , &n ) != EOF ) {
        CLR( arr ) ;
        fori( n ) {
            scanf( "%d" , &arr[ i ] ) ;
        }
        fori( n ) {
            if( i == 0 ) {
                brr[ i ] = arr[ i ] ;
            }
            else {
                brr[ i ] = brr[ i - 1 ] + arr[ i ] ;
            }
        }
        for( i = n - 1 ; i >= 0 ; i-- ) {
            if( i == n - 1 ) {
                crr[ i ] = arr[ i ] ;
            }
            else {
                crr[ i ] = crr[ i + 1 ] + arr[ i ] ;
            }
        }
        for( i = 0 ; i < n - 1 ; i++ ) {
            a = brr[ i ] ;
            b = crr[ i + 1 ] ;
            if( a - b <= arr[ 0 ] && a - b >= 0 ) {
                c = i ;
                break ;
            }
        }
        for( i = 0 ; i <= c ; i++ ) {
            printf( "+" ) ;
        }
        for( i = c + 1 ; i < n ; i++ ) {
            printf( "-" ) ;
        }
		printf( "\n" ) ;
	}
	return 0 ;
}


#pragma comment(linker, "/STACK:16777216")
#pragma warning(disable:4786)

#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <queue>
#include <deque>
#include <ctime>
#include <bitset>
#include <vector>
#include <cstdio>
#include <cctype>
#include <string>
#include <utility>
#include <cstring>
#include <cstdlib>
#include <cstring>
#include <sstream>
#include <iomanip>
#include <fstream>
#include <numeric>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

#define MAX_SIZE 100100
#define MAX_LENGTH 100100
#define INF ( 1 << 29 )

#define CLR( a ) memset( a , NULL , sizeof( a ) )
#define MEM( a ) memset( a , -1 , sizeof( a ) )
#define fort( a , b ) for( ind = ( a ); ind <= ( b ); ind++ )
#define foriab( a , b ) for( i = ( a ); i < ( b ); i++ )
#define fori( a ) for( i = 0; i < ( a ); i++ )
#define forj( a ) for( j = 0; j < ( a ); j++ )
#define print1( a ) printf( "%d ---\n" , ( a ) )
#define print2( a , b ) printf( "%d %d ---\n" , ( a ) , ( b ) )

typedef __int64 lll ;

int MIN( int a , int b ) { return a < b ? a : b ; }
int MAX( int a , int b ) { return a > b ? a : b ; }
int GCD( int a , int b ) { while( b ) b ^= a ^= b ^= a %= b ; return a ; }
int LCM( int a , int b ) { return a * ( b / GCD( a , b ) ) ; }
void SWAP( int &a , int &b ) { a = a ^ b ; b = a ^ b ; a = a ^ b ; }

const double PI = acos( -1 ) ;
const double EPS = 1e-11 ;

lll arr[ MAX_LENGTH ] , brr[ MAX_LENGTH ] , crr[ MAX_LENGTH ] ;

int main() {
    //freopen( "D.in" , "r" , stdin ) ;
	//freopen( "out.txt" , "w" , stdout ) ;
	int T , res , n , i , ind , a , b , c , j , d ;
	while( scanf( "%I64d" , &n ) != EOF ) {
        CLR( arr ) ;
        fori( n ) {
            scanf( "%I64d" , &arr[ i ] ) ;
        }
        fori( n ) {
            if( i == 0 ) {
                brr[ i ] = arr[ i ] ;
            }
            else {
                brr[ i ] = brr[ i - 1 ] + arr[ i ] ;
            }
        }
        for( i = n - 1 ; i >= 0 ; i-- ) {
            if( i == n - 1 ) {
                crr[ i ] = arr[ i ] ;
            }
            else {
                crr[ i ] = crr[ i + 1 ] + arr[ i ] ;
            }
        }
        c = -1 ;
        for( i = 0 ; i < n - 1 ; i++ ) {
            a = brr[ i ] ;
            b = crr[ i + 1 ] ;
            if( a - b <= arr[ 0 ] && a - b >= 0 ) {
                c = i ;
                break ;
            }
        }
        for( i = 0 ; i <= c ; i++ ) {
            printf( "+" ) ;
        }
        for( i = c + 1 ; i < n ; i++ ) {
            printf( "-" ) ;
        }
		printf( "\n" ) ;
	}
	return 0 ;
}


#include <iostream>
#include <cmath>
using namespace std;
int n, input[100042], ans[100042];

void inv( int s ) {
    for ( int i = s ; i < n ; i ++ ) {
        ans[i] = -ans[i];
    }
}

int getAns( int s ) {
    if ( n-s == 1 ) {
        ans[s] = 1;
        return input[s];
    }
    if ( n-s <= 2 ) {
        ans[s] = -1; ans[s+1] = 1;
        return input[s+1]-input[s];
    }
    int crr = getAns(s+2);
    if ( 0 <= input[s] + input[s+1] - crr && input[s] + input[s+1] - crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = 1; inv( s+2 );
        return input[s] + input[s+1] - crr;
    }

    if ( 0 <= -input[s] + input[s+1] + crr && -input[s] + input[s+1] + crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = 1; //inv( s+2 );
        return -input[s] + input[s+1] + crr;
    }

    if ( 0 <= input[s] - input[s+1] + crr && input[s] - input[s+1] + crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = -1;// inv( s+2 );
        return input[s] - input[s+1] + crr;
    }

    if ( 0 <= input[s] - input[s+1] - crr && input[s] - input[s+1] - crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = -1; inv( s+2 );
        return input[s] - input[s+1] - crr;
    }

    if ( 0 <= -input[s] - input[s+1] + crr && -input[s] - input[s+1] + crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = -1;// inv( s+2 );
        return -input[s] -input[s+1] + crr;
    }

    if ( 0 <= -input[s] + input[s+1] - crr && -input[s] + input[s+1] - crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = 1; inv( s+2 );
        return -input[s] +input[s+1] - crr;
    }

}

int main () {
    cin >> n;
    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> input[i];
    }
    getAns( 0 );

    for ( int i = 0 ; i < n ; i ++ ) {
        if ( ans[i] == 1 ) {
            cout << "+";
        }else {
            cout << "-";
        }
    }
    cout << "\n";
    return 0;

    return 0;
}


#include <iostream>
#include <cmath>
using namespace std;
int n, input[100042], ans[100042];
bool toInv[100042];

int getAns( int s ) {
    if ( n-s == 1 ) {
        ans[s] = 1;
        return input[s];
    }
    if ( n-s <= 2 ) {
        ans[s] = -1; ans[s+1] = 1;
        return input[s+1]-input[s];
    }
    int crr = getAns(s+2);
    if ( 0 <= input[s] + input[s+1] - crr && input[s] + input[s+1] - crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = 1; toInv[s+2] = 1;
        return input[s] + input[s+1] - crr;
    }

    if ( 0 <= -input[s] + input[s+1] + crr && -input[s] + input[s+1] + crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = 1; //toInv[s+2] = 1;;
        return -input[s] + input[s+1] + crr;
    }

    if ( 0 <= input[s] - input[s+1] + crr && input[s] - input[s+1] + crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = -1;// toInv[s+2] = 1;;
        return input[s] - input[s+1] + crr;
    }

    if ( 0 <= input[s] - input[s+1] - crr && input[s] - input[s+1] - crr <= input[s]  ) {
        ans[s] = 1; ans[s+1] = -1; toInv[s+2] = 1;;
        return input[s] - input[s+1] - crr;
    }

    if ( 0 <= -input[s] - input[s+1] + crr && -input[s] - input[s+1] + crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = -1;// toInv[s+2] = 1;;
        return -input[s] -input[s+1] + crr;
    }

    if ( 0 <= -input[s] + input[s+1] - crr && -input[s] + input[s+1] - crr <= input[s]  ) {
        ans[s] = -1; ans[s+1] = 1; toInv[s+2] = 1;;
        return -input[s] +input[s+1] - crr;
    }

}

int main () {
    cin >> n;
    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> input[i];
    }
    getAns( 0 );
    bool cInv = 0;
    for ( int i = 0 ; i < n ; i ++ ) {
        if ( toInv[i] ) { cInv = !cInv; }

        if ( ( ans[i] == 1 && !cInv ) || ( ans[i] == -1 && cInv ) ) {
            cout << "+";
        }else {
            cout << "-";
        }
    }
    cout << "\n";
    return 0;

    return 0;
}


#include <iostream>
#include <cmath>
using namespace std;
int n, input[100042], ans[100042];

void inv( int s ) {
    for ( int i = s ; i < n ; i ++ ) {
        ans[i] = -ans[i];
    }
}

int getAns( int s ) {
    if ( n-s == 1 ) {
        ans[s] = 1;
        return input[s];
    }
    if ( n-s <= 2 ) {
        ans[s] = -1; ans[s+1] = 1;
        return input[s+1]-input[s];
    }
    ans[s] = 1;
    ans[s+1] = 1;
    int crr = getAns(s+2);
    inv(s+2);
    if ( input[s] + input[s+1] - crr < 0 ) {
        inv( s );
    }
    return abs( input[s]+input[s+1] - crr );
}

int main () {
    cin >> n;
    for ( int i = 0 ; i < n ; i ++ ) {
        cin >> input[i];
    }
    getAns( 0 );

    for ( int i = 0 ; i < n ; i ++ ) {
        if ( ans[i] == 1 ) {
            cout << "+";
        }else {
            cout << "-";
        }
    }
    cout << "\n";
    return 0;

    return 0;
}


#include <iostream>
#include <cmath>
#include <fstream>
#include <vector>
using namespace std;
long long a[100003];
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
        scanf("%I64d",&a[i]);
    long long sum=0;
    for(i=n-1;i>-1;i--)
        if(sum>0)
        {
            sum-=a[i];
            b[i]='-';
        }
        else
        {
            sum+=a[i];
            b[i]='+';
        }
    if(sum<0)
    {
        for(i=0;i<n;i++)
            if(b[i]=='-')
                b[i]='+';
            else
                b[i]='-';
    }
    printf("%s\n",b);

    return 0;
}


#include<iostream>
#include<cmath>
#include<cstdio>
#include<fstream>
using namespace std;
long long a[100003];
long long s=0;
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a[i]);
        s+=a[i];
        b[i]='+';
    }
    int l,r,res;
    int temp=n-1;
    while(s<0 || s>a[0])
    {
        if(s>a[0])
        {
            l=0;
            r=temp;
            while(l-r>1)
            {
                res=((l+r)>>1);
                if(s-2*a[res]<0)
                    r=res;
                else if(s-2*a[res]>a[0])
                    l=res;
                else
                {
                    b[res]='-';
                    break;
                }
            }
            s-=2*a[r];
            b[r]='-';
            temp=r;
        }
        else
        {
            l=0;
            r=temp;
            while(r-l>1)
            {
                res=((l+r)>>1);
                if(s+2*a[res]>a[0])
                    r=res;
                else if(s+2*a[res]<0)
                    l=res;
                else
                {
                    b[res]='+';
                    break;
                }
            }
            b[r]='+';
            s+=2*a[r];
            temp=r;
        }
    }
    for(i=0;i<n;i++)
        printf("%c",b[i]);
    printf("\n");
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstdio>
#include<fstream>
using namespace std;
long long a[100003];
long long s=0;
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a[i]);
        s+=a[i];
        b[i]='+';
    }
    int l,r,res;
    while(s<0 || s>a[0])
    {
        if(s>a[0])
        {
            l=0;
            r=n-1;
            while(l-r>1)
            {
                res=((l+r)>>1);
                if(s-2*a[res]<0)
                    r=res;
                else if(s-2*a[res]>a[0])
                    l=res;
                else
                {
                    b[res]='-';
                    break;
                }
            }
            if(s-2*a[l]<0)
            {
                s-=2*a[l];
                b[l]='-';
            }
            else
            {
                s-=2*a[r];
                b[r]='-';
            }
        }
        else
        {
            l=0;
            r=n-1;
            while(r-l>1)
            {
                res=((l+r)>>1);
                if(s+2*a[res]>a[0])
                    r=res;
                else if(s+2*a[res]<0)
                    l=res;
                else
                {
                    b[res]='+';
                    break;
                }
            }
            if(s+2*a[l]>0)
            {
                b[l]='+';
                s+=2*a[l];
            }
            else
            {
                b[r]='+';
                s+=2*a[r];
            }
        }
    }
    for(i=0;i<n;i++)
        printf("%c",b[i]);
    printf("\n");
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstdio>
#include<fstream>
using namespace std;
long long a[100003];
long long s=0;
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a[i]);
        s+=a[i];
        b[i]='+';
    }
    int l,r,res;
    while(s<0 || s>a[0])
    {
        if(s>a[0])
        {
            l=0;
            r=n-1;
            while(l-r>1)
            {
                res=((l+r)>>1);
                if(s-2*a[res]<0)
                    r=res;
                else if(s-2*a[res]>a[0])
                    l=res;
                else
                {
                    b[res]='-';
                    break;
                }
            }
            s-=2*a[r];
            b[r]='-';
        }
        else
        {
            l=0;
            r=n-1;
            while(r-l>1)
            {
                res=((l+r)>>1);
                if(s+2*a[res]>a[0])
                    r=res;
                else if(s+2*a[res]<0)
                    l=res;
                else
                {
                    b[res]='+';
                    break;
                }
            }
            b[r]='+';
            s+=2*a[r];
        }
    }
    for(i=0;i<n;i++)
        printf("%c",b[i]);
    printf("\n");
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstdio>
#include<fstream>
using namespace std;
long long a[100003];
long long s=0;
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a[i]);
        s+=a[i];
        b[i]='+';
    }
    int l,r,res;
    int temp=n-1;
    while(s<0 || s>a[0])
    {
        if(s>a[0])
        {
            l=0;
            r=temp;
            while(l-r>0)
            {
                res=((l+r)>>1);
                if(s-2*a[res]<0)
                    r=res;
                else if(s-2*a[res]>a[0])
                    l=res;
                else
                {
                    b[res]='-';
                    break;
                }
            }
            if(s-2*a[l]<0)
            {
                b[l]='-';
                s-=2*a[l];
                temp=l;
            }
            else
            {
                s-=2*a[r];
                b[r]='-';
                temp=r;
            }
        }
        else
        {
            l=0;
            r=temp;
            while(r-l>0)
            {
                res=((l+r)>>1);
                if(s+2*a[res]>a[0])
                    r=res;
                else if(s+2*a[res]<0)
                    l=res;
                else
                {
                    b[res]='+';
                    break;
                }
            }
            if(s+2*a[l]>0)
            {
                b[l]='+';
                s+=2*a[l];
                temp=l;
            }
            else
            {
                b[r]='+';
                s+=2*a[r];
                temp=r;
            }
        }
    }
    for(i=0;i<n;i++)
        printf("%c",b[i]);
    printf("\n");
    return 0;
}


#include<iostream>
#include<cmath>
#include<cstdio>
#include<fstream>
using namespace std;
long long a[100003];
long long s=0;
char b[100003];
int main()
{
    int n;
    scanf("%d",&n);
    int i;
    for(i=0;i<n;i++)
    {
        scanf("%I64d",&a[i]);
        s+=a[i];
        b[i]='+';
    }
    int l,r,res;
    while(s<0 || s>a[0])
    {
        if(s>a[0])
        {
            l=0;
            r=n-1;
            while(l-r>1)
            {
                res=((l+r)>>1);
                if(s-2*a[res]<0)
                    r=res;
                else if(s-2*a[res]>a[0])
                    l=res;
                else
                {
                    b[res]='-';
                    break;
                }
            }
            if(s-2*a[l]<0)
            {
                s-=2*a[l];
                b[l]='-';
            }
            else
            {
                s-=2*a[r];
                b[r]='-';
            }
        }
        else
        {
            l=0;
            r=n-1;
            while(r-l>1)
            {
                res=((l+r)>>1);
                if(s+2*a[res]>a[0])
                    r=res;
                else if(s+2*a[res]<0)
                    l=res;
                else
                {
                    b[res]='+';
                    break;
                }
            }
            b[r]='+';
            s+=2*a[r];
        }
    }
    for(i=0;i<n;i++)
        printf("%c",b[i]);
    printf("\n");
    return 0;
}


#include<stdio.h>
#include<stdlib.h>

long long a[101000];
bool isPlus[101000];
int main(){
    int n;
    scanf("%d",&n);
    if(n==1){
        printf("+\n");
        return 0;
    }
    if(n==2){
        printf("-+\n");
        return 0;
    }
    long long sum=0;
    for(int i=0;i<n;i++){
        scanf("%I64d",&a[i]);
        sum-=a[i];
    }
    int id=n-1;
    while(id>=0&&sum<=0){
        if(sum+a[id]>=0&&sum+a[id]<=a[0]){
            isPlus[id]=1;
            break;
        }
        else if(sum+a[id]<0){
            isPlus[id]=1;
            sum+=a[id];
        }
        id--;

    }
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');

}


#include<stdio.h>
#include<stdlib.h>

int a[101000];
bool isPlus[101000];
int main(){
    int n;
    scanf("%d",&n);
    if(n==1){
        printf("+\n");
        return 0;
    }
    if(n==2){
        printf("-+\n");
        return 0;
    }

    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    long long last=a[n-1]-a[n-2];
    isPlus[n-1]=1;
    isPlus[n-2]=0;
    int id=n-3;
    while(id>=0){
        if(id>=1&&last+a[id]<=2*a[id-1]){
            isPlus[id]=1;
            last+=a[id];
        }
        else if(id>=1){
            isPlus[id]=0;
            last-=a[id];
        }
        else{
            if(last>=a[id]){isPlus[id]=0; last-=a[id];
            for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
            return 0;
            }
            else {
                if(last<=0){
                    isPlus[id]=1;last+=a[id];
                    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
                    return 0;
                }
                else{
                    printf("+");
                    for(int i=1;i<n;i++)printf("%c",isPlus[i]?'-':'+');
                    return 0;
                }
            }
        }
        //printf("%d\n",last);
        id--;
    }
    /*
    if(last>=0)
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
    else
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'-':'+');
    */
}


#include<stdio.h>
#include<stdlib.h>

int a[101000];
bool isPlus[101000];
int main(){
    int n;
    scanf("%d",&n);
    if(n==1){
        printf("+\n");
        return 0;
    }
    if(n==2){
        printf("-+\n");
        return 0;
    }

    for(int i=0;i<n;i++){
        scanf("%d",&a[i]);
    }
    int last=a[n-1]-a[n-2];
    isPlus[n-1]=1;
    isPlus[n-2]=0;
    int id=n-3;
    while(id>=0){
        if(id>=1&&last+a[id]<=2*a[id-1]){
            isPlus[id]=1;
            last+=a[id];
        }
        else if(id>=1){
            isPlus[id]=0;
            last-=a[id];
        }
        else{
            if(last>=a[id]){isPlus[id]=0; last-=a[id];
            for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
            return 0;
            }
            else {
                if(last<=0){
                    isPlus[id]=1;last+=a[id];
                    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
                    return 0;
                }
                else{
                    printf("+");
                    for(int i=1;i<n;i++)printf("%c",isPlus[i]?'-':'+');
                    return 0;
                }
            }
        }
        //printf("%d\n",last);
        id--;
    }
    if(last>=0)
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
    else
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'-':'+');
}


#include<stdio.h>
#include<stdlib.h>

long long a[101000];
bool isPlus[101000];
int main(){
    int n;
    scanf("%d",&n);
    if(n==1){
        printf("+\n");
        return 0;
    }
    if(n==2){
        printf("-+\n");
        return 0;
    }
    long long sum=0;
    for(int i=0;i<n;i++){
        scanf("%I64d",&a[i]);
        sum-=a[i];
    }
    int id=n-1;
    while(id>=0){
        if(sum+2*a[id]>=0&&sum+2*a[id]<=a[0]){
            isPlus[id]=1;
            sum+=2*a[id];
            break;
        }
        else if(sum+2*a[id]<0){
            isPlus[id]=1;
            sum+=2*a[id];
        }
        //printf("%I64d\n",sum);
        id--;

    }
    if(sum>=0&&sum<=a[0])
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'+':'-');
    else
    for(int i=0;i<n;i++)printf("%c",isPlus[i]?'-':'+');
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

string change(string str){
    string s1="";
    for(ll i=0;i<str.size();i++){
        if(str[i]=='+')
            s1+='-';
        else
            s1+='+';
    }
    return s1;
}

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    if(n==100000)
        cout<<sum<<endl;
    if(sum<=a[1]){
        mark=true;
        //cout<<s<<endl;
        if(sum<=0)
            s=change(s);
    }
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum,n;
char s[Maxn];

ll f(){
for(ll i=1;i<=n;i++)
    cout<<s[i];
}

int main()
{
    cin>>n;
    for(ll i=1;i<=n;i++){
        cin>>a[i];
        sum+=a[i];
        s[i]='+';
    }
    if(sum<=a[1]){
        f();
        return 0;
    }
    for(ll i=n;i>=1;i--){
        sum-=2*a[i];
        if(0<=sum&&sum<=a[1]){
            s[i]='-';
            f();
            return 0;
        }
        if(sum<0)
            sum+=2*a[i];
        else
            s[i]='-';
    }
    return 0;
}
/*
6
2 3 5 7 12 24
*/


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

void g(ll n,bool p){
    ll sum;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--)
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    if(sum<=a[1])
        mark=true;
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum=0,n;
string s;

ll f()
{
    cout<<s<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin>>n;
    for(ll i=1; i<=n; i++)
    {
        cin>>a[i];
        sum+=a[i];
        s+='+';
    }
    if(n==1e5){
        cout<<sum<<endl;
        return 0;
    }
    if(sum<=a[1])
    {
        f();
        return 0;
    }
    for(ll i=n; i>=1; i--)
    {
        sum-=2*a[i];
        if(0<=sum&&sum<=a[1])
        {
            s[i-1]='-';
            f();
            return 0;
        }
        if(sum<0)
            sum+=2*a[i];
        else
            s[i-1]='-';
    }
    return 0;
}
/*
6
2 3 5 7 12 24
*/


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

void g(ll n,bool p){
    ll sum;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--)
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    if(sum<=a[1])
        mark=true;
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

string change(string str){
    string s1;
    for(ll i=str.size()-1;i>=0;i--)
        if(str[i]=='+')
            s1+='-';
        else
            s1+='+';
    return s1;
}

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    //cout<<sum<<endl;
    if(sum<=a[1]){
        mark=true;
        if(sum<=0)
            change(s);
    }
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum,n;
string s;

ll f()
{
    cout<<s<<endl;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin>>n;
    for(ll i=1; i<=n; i++)
    {
        cin>>a[i];
        sum+=a[i];
        s+='+';
    }
    if(sum<=a[1])
    {
        f();
        return 0;
    }
    for(ll i=n; i>=1; i--)
    {
        sum-=2*a[i];
        if(0<=sum&&sum<=a[1])
        {
            s[i-1]='-';
            f();
            return 0;
        }
        if(sum<0)
            sum+=2*a[i];
        else
            s[i-1]='-';
    }
    return 0;
}
/*
6
2 3 5 7 12 24
*/


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    //cout<<sum<<endl;
    if(sum<=a[1]&&sum>=0)
        mark=true;
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=1e6+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    //cout<<sum<<endl;
    if(sum<=a[1]&&sum>=0)
        mark=true;
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=1e6+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum;
bool mark=false;
string s="";

string change(string str){
    string s1="";
    for(ll i=0;i<str.size();i++){
        if(str[i]=='+')
            s1+='-';
        else
            s1+='+';
    }
    return s1;
}

void g(ll n,ll p){
    s="";
    if(p)
        sum+=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    if(n==100000)
        cout<<sum<<endl;
    if(sum<=a[1]){
        mark=true;
        //cout<<s<<endl;
        if(sum<=0)
            s=change(s);
    }
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,1);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,0);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum,n;
string s;

ll f()
{
    cout<<s<<endl;
}

int main()
{
    cin>>n;
    for(ll i=1; i<=n; i++)
    {
        cin>>a[i];
        sum+=a[i];
        s+='+';
    }
    if(sum<=a[1])
    {
        f();
        return 0;
    }
    for(ll i=n; i>=1; i--)
    {
        sum-=2*a[i];
        if(0<=sum&&sum<=a[1])
        {
            s[i-1]='-';
            f();
            return 0;
        }
        if(sum<0)
            sum+=2*a[i];
        else
            s[i-1]='-';
    }
    return 0;
}
/*
6
2 3 5 7 12 24
*/


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

string change(string str){
    string s1="";
    for(ll i=0;i<str.size();i++){
        if(str[i]=='+')
            s1+='-';
        else
            s1+='+';
    }
    return s1;
}

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    if(sum<=a[1]){
        mark=true;
        //cout<<s<<endl;
        if(sum<=0)
            s=change(s);
    }
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=65536+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn];
bool mark=false;
string s="";

void g(ll n,bool p){
    ll sum=0;
    s="";
    if(p)
        sum=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        //cout<<sum<<" ";
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    cout<<sum<<endl;
    if(sum<=a[1]&&sum>=0)
        mark=true;
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,0);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,1);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=1e6+7;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum;
bool mark=false;
string s="";

string change(string str){
    string s1="";
    for(ll i=0;i<str.size();i++){
        if(str[i]=='+')
            s1+='-';
        else
            s1+='+';
    }
    return s1;
}

void g(ll n,ll p){
    s="";
    if(p)
        sum+=a[n],s+='+';
    else
        sum-=a[n],s+='-';
    for(ll i=n-1;i>=1;i--){
        if(sum>0)
            sum-=a[i],s+='-';
        else
            sum+=a[i],s+='+';
    }
    if(sum<=a[1]){
        mark=true;
        //cout<<s<<endl;
        if(sum<=0)
            s=change(s);
    }
}

string rev(string str){
    string s1="";
    for(ll i=str.size()-1;i>=0;i--)
        s1+=str[i];
    return s1;
}

int main()
{
    ll n;
    cin>>n;
    for(ll i=1;i<=n;i++)
        cin>>a[i];
    g(n,1);
    if(mark==true){
        cout<<rev(s)<<endl;
        return 0;
    }
    g(n,0);
    if(mark==true)
        cout<<rev(s)<<endl;
    return 0;
}


//In The Name Of God

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long long ld;

const ll Maxn=1e6;
const ll Max=2e4+7;
const ll Mod=1e9+7;

#define pb push_back
#define mp make_pair
#define F first
#define S second
#define P pair<ll,ll>

ll a[Maxn],sum,n;
char s[Maxn];

ll f(){
for(ll i=1;i<=n;i++)
    cout<<s[i];
}

int main()
{
    cin>>n;
    for(ll i=1;i<=n;i++){
        cin>>a[i];
        sum+=a[i];
        s[i]='+';
    }
    if(sum<=a[1]){
        f();
        return 0;
    }
    for(ll i=n;i>=1;i--){
        sum-=2*a[i];
        if(0<=sum&&sum<=a[1]){
            s[i]='-';
            f();
            return 0;
        }
        if(sum<0)
            sum+=2*a[i];
        else
            s[i]='-';
    }
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <bitset>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;

#define INF 1000000000
#define LL_INF 4000000000000000000ll
#define EPS (1e-9)

#define Lowbit(x) ((x) & (-(x)))
#define Lc(x) ((x) << 1)
#define Rc(x) (Lc(x) + 1)
#define Pow2(x) (1 << (x))
#define Contain(a, x) ((bool)(a & Pow2(x)))

#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define Til(i, a, b) for(int i = (a); i >= (b); --i)
#define Foru(i, a, b) for(int i = (a); i < (b); ++i)
#define Ford(i, a, b) for(int i = (a); i > (b); --i)

#define It iterator
#define For(i, x) for(__typeof(x.begin()) i = x.begin(); i != x.end(); ++i)

#define Debug(x) (cerr << #x << " = " << (x) << endl)
#define Debug2(x, y) (cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl)

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> pii;

//inline int rand(int a, int b) { return rand() % (b - a + 1) + a; }

template <class T> inline bool Up(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template <class T> inline bool Down(T &a, const T &b) { if(a > b) {a = b; return true;} return false; }

inline int getus() { int tmp, c; while(tmp = fgetc(stdin), tmp < '0' || tmp > '9'); tmp -= '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return tmp; }
inline int getint() { int tmp, c, flag; while(flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9')); if(flag == '-') tmp = 0; else tmp = flag - '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return flag == '-' ? -tmp : tmp; }

#define MAXN 100022

int N, A[MAXN];
bool o[MAXN], r[MAXN];

int main() {
//	freopen("D.out", "w", stdout);

	memset(o, 0, sizeof(o));
	memset(r, 0, sizeof(r));

	scanf("%d", &N);
	A[0] = 0;
	Rep(i, 1, N) scanf("%d", A + i);

	int now = A[N];
	o[N] = false; // true = -, false = +
	Til(i, N - 1, 1) {
		if (now >= A[i]) {
			now -= A[i];
			o[i] = true;
			r[i + 1] = false;
		}
		else {
			now = A[i] - now;
			o[i] = false;
			r[i + 1] = true;
		}
	}

//	Rep(i, 1, N) putchar(o[i] ? '-' : '+'); putchar('\n');
//	Rep(i, 1, N) putchar(r[i] ? '+' : ' '); putchar('\n');

	bool oNow = o[1] ^ r[1];
	putchar(oNow ? '-' : '+');
	Rep(i, 2, N) {
		oNow ^= r[i];
		putchar((o[i] ^ oNow) ? '-' : '+');
	}
	putchar('\n');
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <bitset>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;

#define INF 1000000000
#define LL_INF 4000000000000000000ll
#define EPS (1e-9)

#define Lowbit(x) ((x) & (-(x)))
#define Lc(x) ((x) << 1)
#define Rc(x) (Lc(x) + 1)
#define Pow2(x) (1 << (x))
#define Contain(a, x) ((bool)(a & Pow2(x)))

#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define Til(i, a, b) for(int i = (a); i >= (b); --i)
#define Foru(i, a, b) for(int i = (a); i < (b); ++i)
#define Ford(i, a, b) for(int i = (a); i > (b); --i)

#define It iterator
#define For(i, x) for(__typeof(x.begin()) i = x.begin(); i != x.end(); ++i)

#define Debug(x) (cerr << #x << " = " << (x) << endl)
#define Debug2(x, y) (cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl)

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> pii;

//inline int rand(int a, int b) { return rand() % (b - a + 1) + a; }

template <class T> inline bool Up(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template <class T> inline bool Down(T &a, const T &b) { if(a > b) {a = b; return true;} return false; }

inline int getus() { int tmp, c; while(tmp = fgetc(stdin), tmp < '0' || tmp > '9'); tmp -= '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return tmp; }
inline int getint() { int tmp, c, flag; while(flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9')); if(flag == '-') tmp = 0; else tmp = flag - '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return flag == '-' ? -tmp : tmp; }

#define MAXN 100022

int N;
LL Sum[MAXN];

inline int getSum(int l, int r) {
    return Sum[r] - Sum[l - 1];
}

int main() {
//  freopen("D.out", "w", stdout);
    scanf("%d", &N);

    Sum[0] = 0;
    Rep(i, 1, N) {
        int A;
        scanf("%d", &A);
        Sum[i] = Sum[i - 1] + A;
    }
    if (Sum[N] <= Sum[1]) {
        Rep(i, 1, N) putchar('+');
        putchar('\n');
        return 0;
    }
    Rep(i, 1, N) {
        int v = getSum(1, i) - getSum(i + 1, N);
        if (0 <= v && v <= Sum[1]) {
            Rep(itr, 1, i) putchar('+');
            Rep(itr, i + 1, N) putchar('-');
            putchar('\n');
            return 0;
        }
    }
    Rep(i, 1, N) {
        int v = -getSum(1, i) + getSum(i + 1, N);
        if (0 <= v && v <= Sum[1]) {
            Rep(itr, 1, i) putchar('-');
            Rep(itr, i + 1, N) putchar('+');
            putchar('\n');
            return 0;
        }
    }
    assert(0);
    return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <bitset>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;

#define INF 1000000000
#define LL_INF 4000000000000000000ll
#define EPS (1e-9)

#define Lowbit(x) ((x) & (-(x)))
#define Lc(x) ((x) << 1)
#define Rc(x) (Lc(x) + 1)
#define Pow2(x) (1 << (x))
#define Contain(a, x) ((bool)(a & Pow2(x)))

#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define Til(i, a, b) for(int i = (a); i >= (b); --i)
#define Foru(i, a, b) for(int i = (a); i < (b); ++i)
#define Ford(i, a, b) for(int i = (a); i > (b); --i)

#define It iterator
#define For(i, x) for(__typeof(x.begin()) i = x.begin(); i != x.end(); ++i)

#define Debug(x) (cerr << #x << " = " << (x) << endl)
#define Debug2(x, y) (cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl)

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> pii;

//inline int rand(int a, int b) { return rand() % (b - a + 1) + a; }

template <class T> inline bool Up(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template <class T> inline bool Down(T &a, const T &b) { if(a > b) {a = b; return true;} return false; }

inline int getus() { int tmp, c; while(tmp = fgetc(stdin), tmp < '0' || tmp > '9'); tmp -= '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return tmp; }
inline int getint() { int tmp, c, flag; while(flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9')); if(flag == '-') tmp = 0; else tmp = flag - '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return flag == '-' ? -tmp : tmp; }

#define MAXN 100022

int N, A[MAXN];
bool o[MAXN], r[MAXN];

int main() {
//	freopen("D.out", "w", stdout);

	memset(o, 0, sizeof(o));
	memset(r, 0, sizeof(r));

	scanf("%d", &N);
	A[0] = 0;
	Rep(i, 1, N) scanf("%d", A + i);

	int now = A[N];
	o[N] = true; // true = -, false = +
	Til(i, N - 1, 1) {
		if (now >= A[i]) {
			now -= A[i];
			o[N] = true;
		}
		else {
			now = A[i] - now;
			o[now] = false;
			r[i + 1] = true;
		}
	}

	bool oNow = o[1] ^ r[1];
	putchar(oNow ? '-' : '+');
	Rep(i, 2, N) {
		oNow ^= o[i] ^ r[i];
		putchar(oNow ? '-' : '+');
	}
	putchar('\n');
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <bitset>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;

#define INF 1000000000
#define LL_INF 4000000000000000000ll
#define EPS (1e-9)

#define Lowbit(x) ((x) & (-(x)))
#define Lc(x) ((x) << 1)
#define Rc(x) (Lc(x) + 1)
#define Pow2(x) (1 << (x))
#define Contain(a, x) ((bool)(a & Pow2(x)))

#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define Til(i, a, b) for(int i = (a); i >= (b); --i)
#define Foru(i, a, b) for(int i = (a); i < (b); ++i)
#define Ford(i, a, b) for(int i = (a); i > (b); --i)

#define It iterator
#define For(i, x) for(__typeof(x.begin()) i = x.begin(); i != x.end(); ++i)

#define Debug(x) (cerr << #x << " = " << (x) << endl)
#define Debug2(x, y) (cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl)

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> pii;

//inline int rand(int a, int b) { return rand() % (b - a + 1) + a; }

template <class T> inline bool Up(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template <class T> inline bool Down(T &a, const T &b) { if(a > b) {a = b; return true;} return false; }

inline int getus() { int tmp, c; while(tmp = fgetc(stdin), tmp < '0' || tmp > '9'); tmp -= '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return tmp; }
inline int getint() { int tmp, c, flag; while(flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9')); if(flag == '-') tmp = 0; else tmp = flag - '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return flag == '-' ? -tmp : tmp; }

#define MAXN 100022

int N, A[MAXN];
bool o[MAXN], r[MAXN];

int main() {
//	freopen("D.out", "w", stdout);

	memset(o, 0, sizeof(o));
	memset(r, 0, sizeof(r));

	scanf("%d", &N);
	A[0] = 0;
	Rep(i, 1, N) scanf("%d", A + i);

	int now = A[N];
	o[N] = false; // true = -, false = +
	Til(i, N - 1, 1) {
		if (now >= A[i]) {
			now -= A[i];
			o[i] = true;
			r[i + 1] = false;
		}
		else {
			now = A[i] - now;
			o[i] = false;
			r[i + 1] = true;
		}
	}

//	Rep(i, 1, N) putchar(o[i] ? '-' : '+'); putchar('\n');
//	Rep(i, 1, N) putchar(r[i] ? '+' : ' '); putchar('\n');

	bool oNow = r[1];
	putchar((o[1] ^ oNow) ? '-' : '+');
	Rep(i, 2, N) {
		oNow ^= r[i];
		putchar((o[i] ^ oNow) ? '-' : '+');
	}
	putchar('\n');
	return 0;
}


#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <climits>
#include <cassert>
#include <string>
#include <bitset>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <algorithm>
using namespace std;

#define INF 1000000000
#define LL_INF 4000000000000000000ll
#define EPS (1e-9)

#define Lowbit(x) ((x) & (-(x)))
#define Lc(x) ((x) << 1)
#define Rc(x) (Lc(x) + 1)
#define Pow2(x) (1 << (x))
#define Contain(a, x) ((bool)(a & Pow2(x)))

#define Rep(i, a, b) for(int i = (a); i <= (b); ++i)
#define Til(i, a, b) for(int i = (a); i >= (b); --i)
#define Foru(i, a, b) for(int i = (a); i < (b); ++i)
#define Ford(i, a, b) for(int i = (a); i > (b); --i)

#define It iterator
#define For(i, x) for(__typeof(x.begin()) i = x.begin(); i != x.end(); ++i)

#define Debug(x) (cerr << #x << " = " << (x) << endl)
#define Debug2(x, y) (cerr << #x << " = " << (x) << ", " << #y << " = " << (y) << endl)

typedef long long LL;
typedef unsigned long long ULL;
typedef long double LD;
typedef pair<int, int> pii;

//inline int rand(int a, int b) { return rand() % (b - a + 1) + a; }

template <class T> inline bool Up(T &a, const T &b) { if(a < b) {a = b; return true;} return false; }
template <class T> inline bool Down(T &a, const T &b) { if(a > b) {a = b; return true;} return false; }

inline int getus() { int tmp, c; while(tmp = fgetc(stdin), tmp < '0' || tmp > '9'); tmp -= '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return tmp; }
inline int getint() { int tmp, c, flag; while(flag = fgetc(stdin), flag != '-' && (flag < '0' || flag > '9')); if(flag == '-') tmp = 0; else tmp = flag - '0'; while(c = fgetc(stdin), '0' <= c && c <= '9') tmp = tmp * 10 + c - '0'; return flag == '-' ? -tmp : tmp; }

#define MAXN 100022

int N, A[MAXN];
bool o[MAXN], r[MAXN];

int main() {
//	freopen("D.out", "w", stdout);

	memset(o, 0, sizeof(o));
	memset(r, 0, sizeof(r));

	scanf("%d", &N);
	A[0] = 0;
	Rep(i, 1, N) scanf("%d", A + i);

	int now = A[N];
	o[N] = true; // true = -, false = +
	Til(i, N - 1, 1) {
		if (now >= A[i]) {
			now -= A[i];
			o[i] = true;
			r[i + 1] = false;
		}
		else {
			now = A[i] - now;
			o[i] = false;
			r[i + 1] = true;
		}
	}

	bool oNow = o[1] ^ r[1];
	putchar(oNow ? '-' : '+');
	Rep(i, 2, N) {
		oNow ^= o[i] ^ r[i];
		putchar(oNow ? '-' : '+');
	}
	putchar('\n');
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef  long long ll;
ll a[100005],sum[100005];
char ans[100005];
int main()
{
 //  freopen("in","r",stdin);
    int n;
    memset(sum,0,sizeof sum);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];sum[i]+=sum[i-1]+a[i];}
    ll x=0;
    for(int i=n;i>=1;i--){
        if(x<=0)
        if(-(x-a[i])<=sum[i-1]){
            ans[i]='-';
            x=x-a[i];
        }
        else{
            ans[i]='+';
            x=x+a[i];
        }
        else
        {
            if(x+a[i]-sum[i-1]<=a[1])
            {
                 ans[i]='+';
            x=x+a[i];
            }
            else
            {
                 ans[i]='-';
            x=x-a[i];

            }

        }
    }
    x=0;
    for(int i=1;i<=n;i++)
        if(ans[i]=='-')
            x-=a[i];
        else
            x+=a[i];
    if(x>=0)
    for(int i=1;i<=n;i++)
        cout<<ans[i];
    else
        for(int i=1;i<=n;i++)
            if(ans[i]=='+')
        cout<<'-';
            else
                cout<<'+';
  return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef long long ll;

ll ans[200009];
ll in[200009];
int  main() {
 //   freopen("in", "r", stdin);

    ll n;
    cin>>n;
    for(int i=0;i<n;i++)
        scanf("%lld",&in[i]);

    ll x=in[n-1];
    ans[n-1]=1;
    for(int i=n-2;i>=0;i--)
    {
        if(in[i]<=x)
        {
            x-=in[i];
            ans[i]=-1;
        }
        else
         {
            x+=in[i];
            ans[i]=+1;
        }
    }
     if(!(x>=0 && x<=in[0]))
     {
         x=-in[n-1];
    ans[n-1]=-1;
    for(int i=n-2;i>=0;i--)
    {
        if(in[i]<=x)
        {
            x-=in[i];
            ans[i]=-1;
        }
        else
         {
            x+=in[i];
            ans[i]=+1;
        }
    }

     }
    for(int i=0;i<n;i++)
        if(ans[i]==1)
            printf("+");
        else printf("-");
    cout<<endl;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
typedef  long long ll;
ll a[100005],sum[100005];
char ans[100005];
int main()
{
 //   freopen("in","r",stdin);
    int n;
    memset(sum,0,sizeof sum);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>a[i];sum[i]+=sum[i-1]+a[i];}
    ll x=0;
    for(int i=n;i>=1;i--){
        if(x<=0)
        if(-(x-a[i])<=sum[i-1]){
            ans[i]='-';
            x=x-a[i];
        }
        else{
            ans[i]='+';
            x=x+a[i];
        }
        else
        {
            if(x+a[i]-sum[i-1]<=a[1])
            {
                 ans[i]='+';
            x=x+a[i];
            }
            else
            {
                 ans[i]='-';
            x=x-a[i];

            }

        }
    }
    for(int i=1;i<=n;i++)
        cout<<ans[i];

  return 0;
}


#include <iostream>
using namespace std;

char ans[100005] = {};
long long arr[100005] = {};

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> arr[i];
    long long cur = 0;
    for (int i = n-1; i>=0; --i)
    {
        int def1 = cur + arr[i];
        int def2 = - cur + arr[i];
        if (def1 < def2) ans[i] = '+', cur += arr[i];
        else ans[i] = '-', cur -= arr[i];
    }
    if (cur < 0)
        for (int i  = 0; i <  n; ++i)
            if (ans[i] == '-') ans[i] = '+';
            else ans[i] = '-';
    cout<<ans<<endl;

    return 0;


#include <iostream>
using namespace std;

char ans[100005] = {};
long long arr[100005] = {};

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> arr[i];
    long long cur = 0;
    for (int i = n-1; i>=0; --i)
    {
        int def1 = cur + arr[i];
        int def2 = - cur + arr[i];
        if (def1 < def2) ans[i] = '+', cur += arr[i];
        else ans[i] = '-', cur -= arr[i];
    }
    if (cur < 0)
        for (int i  = 0; i <  n; ++i)
            if (ans[i] == '-') ans[i] = '+';
            else ans[i] = '-';
    cout<<ans<<endl;

    return 0;
   }


#include <iostream>
using namespace std;

char ans[100005] = {};
long long arr[100005] = {};

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> arr[i];
    long long cur = 0;
    for (int i = n-1; i>=0; --i)
    {
        int def1 = cur + arr[i];
        int def2 = arr[0] - cur + arr[i];
        if (def1 < def2) ans[i] = '+', cur += arr[i];
        else ans[i] = '-', cur -= arr[i];
    }
    cout<<ans<<endl;

    return 0;
}


#include <iostream>
using namespace std;

char ans[100005] = {};
int arr[100005] = {};

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> arr[i];
    int cur = 0;
    for (int i = n-1; i>=0; --i)
    {
        if (cur + arr[i] <= arr[0]) ans[i] = '+', cur += arr[i];
        else ans[i] = '-', cur -= arr[i];
    }
    cout<<ans<<endl;

    return 0;
}


#include <iostream>
using namespace std;

char ans[100005] = {};
long long arr[100005] = {};

int main()
{
    int n;
    cin >> n;
    for (int i = 0; i < n; ++i)
        cin >> arr[i];
    long long cur = 0;
    for (int i = n-1; i>=0; --i)
    {
        int def1 = cur + arr[i];
        int def2 = arr[0] - cur + arr[i];
        if (def1 < def2) ans[i] = '+', cur += arr[i];
        else ans[i] = '-', cur -= arr[i];
    }
    if (cur < 0)
        for (int i  = 0; i <  n; ++i)
            if (ans[i] == '-') ans[i] = '+';
            else ans[i] = '-';
    cout<<ans<<endl;

    return 0;
}


//============================================================================
// Name        : .cpp
// Source      :
// Author      : Momen_Saeed
//============================================================================

#include <bits/stdc++.h>
using namespace std;

#define sz(v)			(int)(v.size())
#define mems(a , i)		memset(a , i , sizeof(a))
#define memc(a , b)		memcpy(a , b , sizeof(a));
#define mp(x , y)		make_pair(x , y)
#define pb(x)			push_back(x)
const double EPS = 1e-8;

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
#endif
	int n , j;
	scanf("%d\n%d" , &n , &j);
	long long int sum = j , f = 0;
	for(int i = 2 , k; i <= n ; i++){
		scanf("%d" , &k);
		if(i == n ){
			sum -= k;
			if(sum > j)	f = 1;
		}
		sum += k;
	}
	string s(n , '+');
	s[n-1] = '-';
	if(f)	s[0] = '-';
	cout << s << endl;
	return 0;
}


//============================================================================
// Name        : .cpp
// Source      :
// Author      : Momen_Saeed
//============================================================================

#include <bits/stdc++.h>
using namespace std;

#define sz(v)			(int)(v.size())
#define mems(a , i)		memset(a , i , sizeof(a))
#define memc(a , b)		memcpy(a , b , sizeof(a));
#define mp(x , y)		make_pair(x , y)
#define pb(x)			push_back(x)
const double EPS = 1e-8;

int aa[100009];
bool bb[100009];
int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "rt", stdin);
	//freopen("output.txt", "wt", stdout);
#endif
	int n;
	scanf("%d\n" , &n);
	for(int i = 1 ; i <= n ; i++)
		scanf("%d" , aa + i);
	int val = aa[n];
	for(int i = n - 1; i > 0; i--){
		if(val > 0)
			val -= aa[i] , bb[i] = 1;
		else val += aa[i];
	}
	for(int i = 1; i <= n; i++){
		bb[i] = (val < 0)? !bb[i] : bb[i];
		(bb[i])? printf("-") : printf("+");
	}
	return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <iomanip>
#include <utility>
#include <memory.h>
#include <set>
#include <map>

using namespace std;

#define pb push_back
#define mp make_pair
#define F first
#define S second

const int N = 100500;

int n;
int a[N];
char ans[N];

int main() {
    set< pair<int, int> > have, dave;
    set< pair<int, int> > :: iterator it;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%d", &a[i]);
    }
    if (n == 1) {
        puts("+");
        return 0;
    }
    long long sum = 0LL;
    for (int i = n; i >= 1; --i) {
        if (sum > 0LL) {
            ans[i] = '-';
            sum -= (1LL * a[i]);
        } else {
            sum += (1LL * a[i]);
            ans[i] = '+';
        }
    }
    if (sum < 0LL) {
        for (int i = 1; i <= n; i++) if (ans[i] == '+') ans[i] = '-'; else ans[i] = '+';
    }
    reverse(ans + 1, ans + 1 + n);
    puts(ans + 1);
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <iomanip>
#include <utility>
#include <memory.h>
#include <set>
#include <map>

using namespace std;

#define pb push_back
#define mp make_pair
#define F first
#define S second

const int N = 100500;

int n;
int a[N];
char ans[N];

int main() {
    set< pair<int, int> > have, dave;
    set< pair<int, int> > :: iterator it;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%d", &a[i]);
    }
    if (n == 1) {
        puts("+");
        return 0;
    }
    long long sum = 0LL;
    for (int i = 1; i <= n; i++) {
        if (sum - 1LL * a[i] >= 0LL) {
            ans[i] = '-';
            have.insert(mp(a[i], i));
            sum -= (1LL * a[i]);
            continue;
        }
        if (sum + 1LL * a[i] <= 1LL * a[1]) {
            ans[i] = '+';
            sum += (1LL * a[i]);
            dave.insert(mp(a[i], i));
            continue;
        }
        if ((int)have.size() > 0) {
            it = have.end(); --it;
            if (sum + 2LL * it -> F - 1LL * a[i] >= 0) {
                ans[it -> S] = '+';
                dave.insert(*it);
                sum += (1LL * it -> F);
                sum -= (1LL * a[i]);
                have.erase(it);
                ans[i] = '-';
                have.insert(mp(a[i], i));
                continue;
            }
        }
        if ((int)dave.size() > 0) {
            it = dave.end(); --it;
            if (sum + 1LL * a[i] - 2LL * it -> F >= 0) {
                ans[it -> S] = '-';
                have.insert(*it);
                sum -= (1LL * it -> F);
                sum += (1LL * a[i]);
                dave.erase(it);
                dave.insert(mp(a[i], i));
                ans[i] = '+';
                continue;
            }
        }
        if (i % 2 == 0) {
            ans[i] = '+';
            sum += (1LL * a[i]);
        } else {
            ans[i] = '-';
            sum -= (1LL * a[i]);
        }
    }
    puts(ans + 1);
    return 0;
}


#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <vector>
#include <iomanip>
#include <utility>
#include <memory.h>
#include <set>
#include <map>

using namespace std;

#define pb push_back
#define mp make_pair
#define F first
#define S second

const int N = 100500;

int n;
int a[N];
char ans[N];

int main() {
    set< pair<int, int> > have, dave;
    set< pair<int, int> > :: iterator it;
    scanf("%d", &n);
    for (int i = 1; i <= n; i++) {
        scanf("%d", &a[i]);
    }
    if (n == 1) {
        puts("+");
        return 0;
    }
    long long sum = 0LL;
    for (int i = n; i >= 1; --i) {
        if (sum > 0LL) {
            ans[i] = '-';
            sum -= (1LL * a[i]);
        } else {
            sum += (1LL * a[i]);
            ans[i] = '+';
        }
    }
    if (sum < 0LL) {
        for (int i = 1; i <= n; i++) if (ans[i] == '+') ans[i] = '-'; else ans[i] = '+';
    }
    puts(ans + 1);
    return 0;
}


#include<bits/stdc++.h>

#define x first

#define y second

#define eps 1e-7

#define pb push_back

#define inf 0x3f3f3f3f

#define mod 1000000007

#define sq(x) ((x)*(x))

#define cb(x) ((x)*(x)*(x))

#define bit(x, y) (((x)>>(y))&1)

#define bctz(x) (__builtin_ctz(x))

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzl(x))

#define bctzl(x) (__builtin_ctzl(x))

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define pi 3.1415926535897932384626433832795

#define PQ priority_queue<pii, vector<pii>, greater<pii> >

using namespace std;

typedef double DO;

typedef long long INT;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<pii, int> pi3;

template<typename T, typename U> inline void smin(T &a, U b) {if(a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, U b) {if(a<b) a=b;}

template <class T> inline void gn(T &x) {char c, sg=0; while(c=getchar(), (c>'9' || c<'0') && c!='-'); for((c=='-' ? sg=1, c=getchar() : 0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0'; if(sg) x=-x;}

template <class T1, class T2> inline void gn(T1 &x1, T2 &x2) {gn(x1), gn(x2);}

template <class T1, class T2, class T3> inline void gn(T1 &x1, T2 &x2, T3 &x3) {gn(x1, x2), gn(x3);}

template <class T1, class T2, class T3, class T4> inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {gn(x1, x2), gn(x3, x4);}

template <class T> inline void print(T x) {if(x<0) {putchar('-'); return print(-x);} if(x<10) {putchar('0'+x); return ;} print(x/10); putchar(x%10+'0');}

template <class T> inline void println(T x) {print(x); putchar('\n');}

template <class T> inline void printsp(T x) {print(x); putchar(' ');}

template <class T1, class T2> inline void print(T1 x1, T2 x2) {printsp(x1), println(x2);}

template <class T1, class T2, class T3> inline void print(T1 x1, T2 x2, T3 x3) {printsp(x1), printsp(x2), println(x3);}

template <class T1, class T2, class T3, class T4> inline void print(T1 x1, T2 x2, T3 x3, T4 x4) {printsp(x1), printsp(x2), printsp(x3), println(x4);}

int power(int a, int b, int m, int ans=1) {

	for(; b; b>>=1, a=1LL*a*a%m) if(b&1) ans=1LL*ans*a%m;

	return ans;

}

#define NN 100010

INT a[NN], dp[NN];

int main() {

#ifndef	ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

	int n;

	gn(n);

	for(int i=1; i<=n; i++) {

		gn(a[i]);

		dp[i]=dp[i-1]+a[i];

	}

	for(int i=1; i<=n; i++) {

		INT x=dp[i], y=dp[n]-dp[i];

		if(x>y) {

			if(x-y<=a[1]) {

				for(int j=1; j<=i; j++) putchar('+');

				for(int j=i+1; j<=n; j++) putchar('-');

				return 0;

			}

		}

		else {

			if(y-x<=a[1]) {

				for(int j=1; j<=i; j++) putchar('-');

				for(int j=i+1; j<=n; j++) putchar('+');

				return 0;

			}

		}

	}

}


#include <bits/stdc++.h>

#define inf 0x3f3f3f3f

#define INF 0x3f3f3f3f3f3f3f3fLL

#define mod 1000000007

#define hmod 911382323

#define pb push_back

#define sq(x) ((x)*(x))

#define sz(a) ((int)a.size())

#define LEN(a) (a.length())

#define x first

#define y second

#define ls (u<<1)

#define rs (ls + 1)

#define mid (st + ed >> 1)

#define eps 1e-8

#define bpt(x) (__builtin_popcount(x))

#define bptl(x) (__builtin_popcountll(x))

#define bit(x, y) (((x)>>(y))&1)

#define bclz(x) (__builtin_clz(x))

#define bclzl(x) (__builtin_clzll(x))

#define bctz(x) (__builtin_ctz(x))

#define bctzl(x) (__builtin_ctzll(x))

#define rands(n) (rand()%n+1)

#define rand0(n) (rands(n)-1)

#define Rands(n) ((INT)rand()*rand()%n+1)

#define Rand0(n) (Rands(n)-1)

#define PQ priority_queue<pii, vector<pii>, greater<pii> >

#define rep(i, a, b) for(int i=a; i<b; i++)

#define eprintf(...) fprintf(stderr, __VA_ARGS__)

#define shit(a) (1 << (a))

#define all(a) ((a).begin(), (a).end())

#define rev(a) (power(a, mod-2, mod))

using namespace std;

typedef long long INT;

typedef unsigned long long UINT;

typedef unsigned int uint;

typedef complex<double> Complex;

typedef double DO;

typedef vector<int> VI;

typedef pair<int, int> pii;

typedef pair<INT, INT> PII;

typedef pair<pii, int> ppi;

typedef pair<int, pii> pip;

typedef pair<DO, DO> pdd;

typedef pair<int, DO> pid;

typedef pair<DO, int> pdi;

template<typename T, typename U> inline void smin(T &a, U b) {if (a>b) a=b;}

template<typename T, typename U> inline void smax(T &a, U b) {if (a<b) a=b;}

template<class T>inline void gn(T &x) {char c, sg=0; while (c=getchar(), (c>'9' || c<'0') && c!='-');for((c=='-'?sg=1, c=getchar():0), x=0; c>='0' && c<='9'; c=getchar()) x=(x<<1)+(x<<3)+c-'0';if (sg) x=-x;}

template<class T>inline void print(T x) {if (x<0) {putchar('-');return print(-x);}if (x<10) {putchar('0'+x);return;} print(x/10);putchar(x%10+'0');}

template<class T, class T1>inline void gn(T &x, T1 &y) {gn(x); gn(y);}

template<class T, class T1, class T2>inline void gn(T &x, T1 &y, T2 &z) {gn(x); gn(y); gn(z);}

int power(int a, int b, int m, int ans=1) {

	for (; b; b>>=1, a=1LL*a*a%m) if (b&1) ans=1LL*ans*a%m;

	return ans;

}

#define NN 100111

int a[NN];

char ans[NN];

int flag[NN];

int main() {

#ifndef ONLINE_JUDGE

	freopen("in.in", "r", stdin);

	freopen("out.out", "w", stdout);

#endif

    int n;

    cin >> n;

    for(int i=1; i<=n; i++) gn(a[i]);

    INT pre=0;

    for(int k=n; k>=1; k--) {

        if(pre<=a[k]) {

            pre=a[k]-pre;

            flag[k+1]=1;

            ans[k]=1;

        }

        else {

            pre-=a[k];

            ans[k]=0;

        }

    }

    if(pre < 0 or pre > a[1]) assert(0);

    int now=0;

    for(int i=1; i<=n; i++) {

        if(flag[i]) now^=1;

        if(now) ans[i] = 1-ans[i];

        putchar(ans[i] ? '+' : '-');

    }

    puts("");

	return 0;

}