← Home
#pragma GCC optimize(3, "Ofast", "inline", "unroll-loops")
#include <bits/stdc++.h>
#define int long long
 
using namespace std;
const int N = 1000010;
const int mod = 998244353;
// const int inf = 1.05e9;
const long long inf = 1e18;
 
using ld = long double;
using ull = unsigned long long;
using i128 = __int128;
const ull base = 13331;
 
namespace Luminescent
{
    const double pi = acos(-1);
    const ld pi_l = acosl(-1);
    inline int read()
    {
        int x = 0;
        char ch;
        while (!isdigit(ch = getchar()))
            ;
        x = ch & 15;
        while (isdigit(ch = getchar()))
            x = (x << 3) + (x << 1) + (ch & 15);
        return x;
    }
    struct DSU
    {
        int fa[N], siz[N];
        inline DSU() { iota(fa, fa + N, 0), fill(siz, siz + N, 1); }
        inline void init(int maxn) { iota(fa, fa + maxn + 1, 0), fill(siz, siz + maxn + 1, 1); }
        inline int find(int x) { return x == fa[x] ? x : fa[x] = find(fa[x]); }
        inline int merge(int x, int o)
        {
            x = find(x), o = find(o);
            if (siz[x] > siz[o])
                x ^= o ^= x ^= o;
            if (x != o)
                return fa[x] = o, siz[o] += siz[x], 1;
            return 0;
        }
    };
    constexpr inline void add(int &x, int a) { x = (x + a) % mod; }
    constexpr inline void del(int &x, int a) { x = (x - a + mod) % mod; }
    constexpr inline int power(int a, int b, int c)
    {
        int mx = 1;
        while (b)
        {
            if (b & 1)
                mx = 1ll * mx * a % c;
            a = 1ll * a * a % c, b >>= 1;
        }
        return mx;
    }
    constexpr inline int inversion(int x) { return power(x, mod - 2, mod); }
    constexpr inline int inversion(int x, int Mod) { return power(x, Mod - 2, Mod); }
    constexpr inline int exgcd(int a, int b, int &x, int &y)
    {
        if (!b)
            return x = 1, y = 0, a;
        int g = exgcd(b, a % b, y, x);
        y -= a / b * x;
        return g;
    }
    int _exgcd_xp, _exgcd_yp;
    inline int exgcd_inv(int a, int Mod)
    {
        exgcd(a, Mod, _exgcd_xp, _exgcd_yp);
        return (_exgcd_xp % Mod + Mod) % Mod;
    }
    constexpr inline int varphi(int x)
    {
        int phi = 1;
        for (int i = 2; i * i <= x; ++i)
            if (x % i == 0)
            {
                phi *= (i - 1);
                x /= i;
                while (x % i == 0)
                    phi *= i, x /= i;
            }
        if (x > 1)
            phi *= (x - 1);
        return phi;
    }
    inline void chkmax(int &x, int y)
    {
        if (x < y)
            x = y;
    }
    inline void chkmin(int &x, int y)
    {
        if (x > y)
            x = y;
    }
}
using namespace Luminescent;
 
namespace Loyalty
{
    int a[N];
    inline void init() {}
    inline void print(vector<string> &op)
    {
        for (string &i : op)
            cout << i << '\n';
    }
    inline void main([[maybe_unused]] int _ca, [[maybe_unused]] int _atc)
    {
        int n;
        string s;
        cin >> n >> s;
        string S = s;
        vector<string> res;
        for (int i = 0; i < 3; ++i)
        {
            string op;
            op.push_back(s[0]);
            for (int i = 1; i < s.size(); ++i)
                op.push_back('+'), op.push_back(s[i]);
            res.emplace_back(op);
            int res = 0;
            for (char &i : s)
                res = res + (i & 15);
            s = to_string(res);
        }
        // if (n == 1832)
        //     cout << "s.size() = " << s.size() << ": " << s << '\n';
        if (s.size() < 2)
            print(res);
        else
        {
            res.clear();
            s = S;
            string op;
            op.push_back(s[0]), op.push_back(s[1]);
            for (int i = 2; i < n; ++i)
                op.push_back('+'), op.push_back(s[i]);
            int re = (s[0] & 15) * 10 + (s[1] & 15);
            for (int i = 2; i < n; ++i)
                re += (s[i] & 15);
            s = to_string(re);
            res.emplace_back(op);
            for (int i = 0; i < 2; ++i)
            {
                string op;
                op.push_back(s[0]);
                for (int i = 1; i < s.size(); ++i)
                    op.push_back('+'), op.push_back(s[i]);
                res.emplace_back(op);
                int res = 0;
                for (char &i : s)
                    res = res + (i & 15);
                s = to_string(res);
            }
            if (s.size() < 2)
            {
                print(res);
                return;
            }
            do
            {
                mt19937 mt(time(0));
                uniform_int_distribution<int> dist(1, n - 1), dist2(0, 15);
                while (1)
                {
                    res.clear();
                    s = S;
                    string op;
                    int re = 0, las = 0;
                    // int pos = dist(mt), re = 0, las = 0;
                    // while (s[pos - 1] == '0' && s[pos] == '0')
                    //     pos = dist(mt);
                    for (int i = 1; i < n; ++i)
                        if (!dist2(mt))
                        {
                            if (op.size())
                                op.push_back('+');
                            op.push_back(s[i - 1]), op.push_back(s[i]);
                            re += (s[i - 1] & 15) * 10 + (s[i] & 15);
                            las = i++;
                        }
                        else
                        {
                            if (op.size())
                                op.push_back('+');
                            op.push_back(s[i - 1]);
                            re += (s[i - 1] & 15);
                            las = i - 1;
                        }
                    // cerr << "Op = " << op << '\n';
                    if (las != n - 1)
                        op.push_back('+'), op.push_back(s[n - 1]), re += (s[n - 1] & 15);
                    s = to_string(re);
                    // cerr << "Now s = " << s << '\n';
                    res.emplace_back(op);
                    for (int i = 0; i < 2; ++i)
                    {
                        string op;
                        op.push_back(s[0]);
                        for (int i = 1; i < s.size(); ++i)
                            op.push_back('+'), op.push_back(s[i]);
                        res.emplace_back(op);
                        int res = 0;
                        for (char &i : s)
                            res = res + (i & 15);
                        s = to_string(res);
                    }
                    if (s.size() < 2)
                    {
                        print(res);
                        return;
                    }
                }
            } while (1);
        }
    }
} // namespace Loyalty
 
signed main()
{
    cin.tie(0)->sync_with_stdio(false);
    cout << fixed << setprecision(15);
    cerr << "start!\n";
    int T = 1;
    // cin >> T;
    Loyalty::init();
    for (int ca = 1; ca <= T; ++ca)
        Loyalty::main(ca, T);
    cerr << "clock() = " << clock() << '\n';
    return 0;
}