#include <bits/stdc++.h>
using namespace std;
class AVLTree {
 private:
  class Node {
   private:
    int data;
    int height;
    Node* parent;
    Node* left_child;
    Node* right_child;

   public:
    Node(int val) {
      data = val;
      height = 0;
      parent = (Node*)0;
      left_child = (Node*)0;
      right_child = (Node*)0;
    }
    int getData() { return data; }
    int getHeight() { return height; }
    int updateHeight() {
      if (left_child != 0 && right_child != 0) {
        if (left_child->getHeight() > right_child->getHeight())
          height = left_child->getHeight() + 1;
        else
          height = right_child->getHeight() + 1;
      } else if (left_child != 0)
        height = left_child->getHeight() + 1;
      else if (right_child != 0)
        height = right_child->getHeight() + 1;
      else
        height = 0;
      return height;
    }
    int getBalance() {
      Node* n = this;
      if (n->getLeftChild() != 0 && n->getRightChild() != 0)
        return n->getLeftChild()->getHeight() - n->getRightChild()->getHeight();
      else if (n->getLeftChild() != 0)
        return n->getLeftChild()->getHeight() + 1;
      else if (n->getRightChild() != 0)
        return (-1) * (n->getRightChild()->getHeight() + 1);
      else
        return 0;
    }
    Node* getParent() { return parent; }
    void removeParent() { parent = (Node*)0; }
    Node* getLeftChild() { return left_child; }
    Node* setLeftChild(Node* new_left) {
      if (new_left != 0) new_left->parent = this;
      left_child = new_left;
      updateHeight();
      return left_child;
    }
    Node* getRightChild() { return right_child; }
    Node* setRightChild(Node* new_right) {
      if (new_right != 0) new_right->parent = this;
      right_child = new_right;
      updateHeight();
      return right_child;
    }
  };
  void setRoot(Node* n) {
    root = n;
    if (root != 0) root->removeParent();
  }
  Node* findNode(int val) {
    Node* temp = root;
    while (temp != 0) {
      if (val == temp->getData())
        return temp;
      else if (val < temp->getData())
        temp = temp->getLeftChild();
      else
        temp = temp->getRightChild();
    }
    return (Node*)0;
  }
  void rotateLeft(Node* n) {
    Node* p = n->getParent();
    enum { left, right } side;
    if (p != 0) {
      if (p->getLeftChild() == n)
        side = left;
      else
        side = right;
    }
    Node* temp = n->getRightChild();
    n->setRightChild(temp->getLeftChild());
    temp->setLeftChild(n);
    if (p != 0) {
      if (side == left) p->setLeftChild(temp);
      if (side == right) p->setRightChild(temp);
    } else {
      setRoot(temp);
    }
  }
  void rotateRight(Node* n) {
    Node* p = n->getParent();
    enum { left, right } side;
    if (p != 0) {
      if (p->getLeftChild() == n)
        side = left;
      else
        side = right;
    }
    Node* temp = n->getLeftChild();
    n->setLeftChild(temp->getRightChild());
    temp->setRightChild(n);
    if (p != 0) {
      if (side == left) p->setLeftChild(temp);
      if (side == right) p->setRightChild(temp);
    } else {
      setRoot(temp);
    }
  }
  void balanceAtNode(Node* n) {
    int bal = n->getBalance();
    if (bal > 1) {
      if (n->getLeftChild()->getBalance() < 0) rotateLeft(n->getLeftChild());
      rotateRight(n);
    } else if (bal < -1) {
      if (n->getRightChild()->getBalance() > 0) rotateRight(n->getRightChild());
      rotateLeft(n);
    }
  }
  Node* root;

 public:
  AVLTree() { root = (Node*)0; }
  AVLTree(int val) { root = new Node(val); }
  AVLTree* findSubtree(int val) {
    Node* target;
    target = findNode(val);
    if (target != 0) {
      AVLTree* subtree = new AVLTree();
      subtree->root = target;
      return subtree;
    } else
      return (AVLTree*)0;
  }
  bool insert(int val) {
    Node* added_node;
    if (root == 0) {
      root = new Node(val);
    } else {
      Node* temp = root;
      while (true) {
        if (temp->getData() > val) {
          if ((temp->getLeftChild()) == 0) {
            added_node = temp->setLeftChild(new Node(val));
            break;
          } else {
            temp = temp->getLeftChild();
          }
        } else if (temp->getData() < val) {
          if ((temp->getRightChild()) == 0) {
            added_node = temp->setRightChild(new Node(val));
            break;
          } else {
            temp = temp->getRightChild();
          }
        } else {
          return false;
        }
      }
      temp = added_node;
      while (temp != 0) {
        temp->updateHeight();
        balanceAtNode(temp);
        temp = temp->getParent();
      }
    }
    return true;
  }
  bool remove(int val) {
    if (root == 0) return false;
    Node *replacement, *replacement_parent, *temp_node;
    Node* to_be_removed = findNode(val);
    if (to_be_removed == 0) return false;
    Node* p = to_be_removed->getParent();
    enum { left, right } side;
    if (p != 0) {
      if (p->getLeftChild() == to_be_removed)
        side = left;
      else
        side = right;
    }
    int bal = to_be_removed->getBalance();
    if (to_be_removed->getLeftChild() == 0 &&
        to_be_removed->getRightChild() == 0) {
      if (p != 0) {
        if (side == left)
          p->setLeftChild((Node*)0);
        else
          p->setRightChild((Node*)0);
        delete to_be_removed;
        p->updateHeight();
        balanceAtNode(p);
      } else {
        setRoot((Node*)0);
        delete to_be_removed;
      }
    } else if (to_be_removed->getRightChild() == 0) {
      if (p != 0) {
        if (side == left)
          p->setLeftChild(to_be_removed->getLeftChild());
        else
          p->setRightChild(to_be_removed->getLeftChild());
        delete to_be_removed;
        p->updateHeight();
        balanceAtNode(p);
      } else {
        setRoot(to_be_removed->getLeftChild());
        delete to_be_removed;
      }
    } else if (to_be_removed->getLeftChild() == 0) {
      if (p != 0) {
        if (side == left)
          p->setLeftChild(to_be_removed->getRightChild());
        else
          p->setRightChild(to_be_removed->getRightChild());
        delete to_be_removed;
        p->updateHeight();
        balanceAtNode(p);
      } else {
        setRoot(to_be_removed->getRightChild());
        delete to_be_removed;
      }
    } else {
      if (bal > 0) {
        if (to_be_removed->getLeftChild()->getRightChild() == 0) {
          replacement = to_be_removed->getLeftChild();
          replacement->setRightChild(to_be_removed->getRightChild());
          temp_node = replacement;
        } else {
          replacement = to_be_removed->getLeftChild()->getRightChild();
          while (replacement->getRightChild() != 0) {
            replacement = replacement->getRightChild();
          }
          replacement_parent = replacement->getParent();
          replacement_parent->setRightChild(replacement->getLeftChild());
          temp_node = replacement_parent;
          replacement->setLeftChild(to_be_removed->getLeftChild());
          replacement->setRightChild(to_be_removed->getRightChild());
        }
      } else {
        if (to_be_removed->getRightChild()->getLeftChild() == 0) {
          replacement = to_be_removed->getRightChild();
          replacement->setLeftChild(to_be_removed->getLeftChild());
          temp_node = replacement;
        } else {
          replacement = to_be_removed->getRightChild()->getLeftChild();
          while (replacement->getLeftChild() != 0) {
            replacement = replacement->getLeftChild();
          }
          replacement_parent = replacement->getParent();
          replacement_parent->setLeftChild(replacement->getRightChild());
          temp_node = replacement_parent;
          replacement->setLeftChild(to_be_removed->getLeftChild());
          replacement->setRightChild(to_be_removed->getRightChild());
        }
      }
      if (p != 0) {
        if (side == left)
          p->setLeftChild(replacement);
        else
          p->setRightChild(replacement);
        delete to_be_removed;
      } else {
        setRoot(replacement);
        delete to_be_removed;
      }
      balanceAtNode(temp_node);
    }
    return true;
  }
  int getHeight() { return root->getHeight(); }
  int successor(int x) {
    Node* temp = root;
    bool found = false;
    int ans;
    while (temp != 0) {
      if (temp->getData() >= x) {
        ans = temp->getData();
        found = true;
        temp = temp->getLeftChild();
      } else {
        temp = temp->getRightChild();
      }
    }
    if (found) {
      return ans;
    } else {
      throw "no greater-or-equal elements found";
    }
  }
  int predecessor(int x) {
    Node* temp = root;
    int ans;
    bool found = false;
    while (temp != 0) {
      if (temp->getData() <= x) {
        ans = temp->getData();
        found = true;
        temp = temp->getRightChild();
      } else {
        temp = temp->getLeftChild();
      }
    }
    if (found) {
      return ans;
    } else {
      throw "no lesser-or-equal element found";
    }
  }
};
struct heap_element {
  int index;
  double key;
};
class min_heap {
 public:
  double inf = numeric_limits<double>::infinity();
  vector<heap_element> a;
  map<int, int> position;
  int heap_size = 0;
  void clear() {
    a.clear();
    position.clear();
    heap_size = 0;
  }
  void insert(heap_element x) {
    if (a.size() == 0) {
      a.push_back(heap_element({0, 0}));
    }
    if (heap_size + 1 == a.size()) {
      a.push_back(x);
    } else {
      a[heap_size + 1] = x;
    }
    position[x.index] = heap_size + 1;
    heap_size++;
    swap(heap_size);
  }
  void decrease_key(int index, double key) {
    a[position[index]].key = key;
    swap(position[index]);
  }
  void erase(int index) {
    decrease_key(index, -inf);
    extract_min();
  }
  double minimal_key() { return a[1].key; }
  heap_element extract_min() {
    heap_element extracted = a[1];
    position[extracted.index] = 0;
    a[1] = a[heap_size];
    position[a[1].index] = 1;
    heap_size--;
    min_heapify(1);
    return extracted;
  }
  double element_key(int index) { return a[position[index]].key; }

 private:
  int p(int x) { return x / 2; }
  int l(int x) { return x * 2; }
  int r(int x) { return x * 2 + 1; }
  void min_heapify(int i) {
    int left = l(i);
    int right = r(i);
    int m;
    if (left <= heap_size && a[left].key < a[i].key) {
      m = left;
    } else {
      m = i;
    }
    if (right <= heap_size && a[right].key < a[m].key) {
      m = right;
    }
    if (m != i) {
      position[a[i].index] = m;
      position[a[m].index] = i;
      heap_element buff;
      buff = a[i];
      a[i] = a[m];
      a[m] = buff;
      min_heapify(m);
    }
  }
  void swap(int k) {
    if (k > 1) {
      if (a[p(k)].key > a[k].key) {
        position[a[k].index] = p(k);
        position[a[p(k)].index] = k;
        heap_element buff = a[k];
        a[k] = a[p(k)];
        a[p(k)] = buff;
        swap(p(k));
      }
    }
  }
};
int main() {
  int n;
  bool is_possible = true;
  cin >> n;
  char cmd;
  int x;
  vector<int> out_order;
  map<int, int> buy_positions;
  min_heap cum_out;
  AVLTree out_positions = AVLTree();
  for (int i = 0; i < 2 * n; i++) {
    out_order.push_back(-1);
    cin >> cmd;
    if (cmd == '+') {
      out_positions.insert(i);
    }
    if (cmd == '-') {
      cin >> x;
      out_order[i] = -x;
      buy_positions[x] = i;
    }
  }
  int best_place;
  for (int i = 1; i <= n; i++) {
    try {
      best_place = out_positions.predecessor(buy_positions[i] - 1);
    } catch (const char*) {
      is_possible = false;
      break;
    }
    out_order[best_place] = i;
    out_positions.remove(best_place);
  }
  if (is_possible) {
    for (int i = 0; i < 2 * n; i++) {
      if (out_order[i] > 0) {
        cum_out.insert(heap_element({out_order[i], (double)(out_order[i])}));
      }
      if (out_order[i] < 0) {
        if ((cum_out.minimal_key() + 0.1 < -out_order[i]) ||
            (cum_out.minimal_key() - 0.1 > -out_order[i])) {
          is_possible = false;
          break;
        } else {
          cum_out.erase(-out_order[i]);
        }
      }
    }
  }
  if (is_possible) {
    cout << "YES" << endl;
    for (int i = 0; i < 2 * n; i++) {
      if (out_order[i] > -1) {
        cout << out_order[i] << ' ';
      }
    }
  } else {
    cout << "NO";
  }
}
