#include <bits/stdc++.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main() {
    int N;
    cin >> N;
    
    string S;
    cin >> S;
    vector<int> SUP(N + 1), INF(N + 1);
    
    int h = 0;
    int k = 0;
    bool possibile = true;

    for (int i = 0; i < N; i++) {
        if (S[i] == '+') {
            SUP[h] = i;
            h = h + 1;
        } else if (S[i] == '-') {
            INF[k] = i;
            k = k + 1;
        }
    }

    if (h == 0 || k == 0) possibile = false;
    if (S[0] != '+' || S[N - 1] != '-') possibile = false;

    if (possibile) {
        cout << "YES" << endl;
        for (int i = 0; i <= h - 1; i++) cout << SUP[i] << ' ';
        for (int i = k - 1; i >= 0; i--) cout << INF[i] << ' ';
        std::cout << '\n';
    } else {
        cout << "NO" << endl;
    }

    return 0;
}
