#include <fstream>
class InParser
{
#pragma warning(disable:4996)
private:
FILE* fin;
char* buff;
int sp;
char read()
{
++sp;
if (sp == 4096)
{
sp = 0;
fread(buff, 1, 4096, fin);
}
return buff[sp];
}
public:
InParser(const char* nume)
{
sp = 4095;
buff = new char[4096];
fin = fopen(nume, "r");
}
InParser& operator >> (int& n)
{
char c;
while (!isdigit(c = read()));
n = c - '0';
while (isdigit(c = read()))
n = n * 10 + c - '0';
return *this;
}
InParser& operator >> (long long& n)
{
int sgn = 1;
char c;
while (!isdigit(c = read()) && c != '-');
if (c == '-')
sgn = -1;
else
n = c - '0';
while (isdigit(c = read()))
n = n * 10 + c - '0';
n *= sgn;
return *this;
}
};
InParser fin("semne.in");
std::ofstream fout("semne.out");
const int NMAX = 5 * 1e4 + 1;
char sgn[NMAX];
int n;
long long a[NMAX], _s, s;
bool solve(long long sum, int n)
{
if (sum < s)
return false;
if (sum == s)
return true;
for (int i = n; i >= 0; --i)
{
sgn[i] = '-';
if (solve(sum - 2 * a[i], i - 1))
return true;
sgn[i] = '+';
}
return false;
}
int main()
{
fin >> n >> s;
for (int i = 0; i < n; ++i)
{
fin >> a[i];
_s += a[i];
sgn[i] = '+';
}
solve(_s, n - 1);
fout << sgn << "\n";
fout.close();
return 0;
}