#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 5;
int n, k;
char oper[maxn][5];
int id[maxn];
bool ok[maxn];
struct Present {
  int l, r;
  Present(int l, int r) : l(l), r(r) {}
  bool operator<(const Present& pt) const {
    if (l == pt.l) return r < pt.r;
    return l < pt.l;
  }
};
vector<Present> v[maxn];
vector<Present> interval;
int l[maxn];
int a[maxn];
int main() {
  while (cin >> n >> k) {
    for (int i = 1; i <= n; ++i) l[i] = 1, v[i].clear();
    memset(ok, 0, sizeof(ok));
    interval.clear();
    memset(l, 0, sizeof(l));
    for (int i = 1; i <= k; ++i) {
      scanf("%s%d", oper[i], id + i);
      int x = id[i];
      if (oper[i][0] == '+')
        l[x] = i, ok[x] = true;
      else {
        ok[x] = false;
        v[x].push_back(Present(l[x], i));
        interval.push_back(Present(l[x], i));
        l[x] = 1;
      }
    }
    for (int i = 1; i <= n; ++i)
      if (ok[i]) {
        v[i].push_back(Present(l[i], k + 1));
        interval.push_back(Present(l[i], k + 1));
      }
    sort(interval.begin(), interval.end());
    int l = interval[0].l, r = interval[0].r;
    memset(a, 0, sizeof(a));
    bool flag = true;
    int S = 0;
    for (int i = 0; i < interval.size(); ++i) {
      int ll = interval[i].l, rr = interval[i].r;
      if (ll >= l && ll <= r) {
        if (rr > r) r = rr;
      } else {
        S += r - l;
        flag = false;
        l = interval[i].l, r = interval[i].r;
        flag = true;
      }
    }
    if (flag) S += r - l;
    vector<int> ans;
    for (int i = 1; i <= n; ++i) {
      ok[i] = true;
      int cnt = 0;
      for (int j = 0; j < v[i].size() && ok[i]; ++j) {
        int l = v[i][j].l, r = v[i][j].r;
        cnt += r - l;
      }
      if (cnt != S) ok[i] = false;
      if (v[i].size() == 0) ok[i] = true;
      if (ok[i]) ans.push_back(i);
    }
    printf("%d\n", ans.size());
    for (int i = 0; i < ans.size(); ++i) printf("%d ", ans[i]);
    printf("\n");
  }
}
