#include <bits/stdc++.h>
using namespace std;
int n, m;
char ch[100030][5];
int arr[100030];
int flag[100030];
int ans[100030];
bool vis[100030], in[100030];
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    for (int i = 1; i <= n; i++) flag[i] = 0, vis[i] = true, in[i] = false;
    int k = -1;
    for (int i = 0; i < m; i++) {
      scanf("%s%d", ch[i], arr + i);
      vis[arr[i]] = false;
      if (flag[arr[i]] == 0 && ch[i][0] == '-') {
        k = i;
      }
      flag[arr[i]] = (ch[i][0] == '+' ? 1 : 2);
    }
    arr[m] = 0;
    int cnt = 0;
    bool ok = true;
    for (int i = 0; i <= k; i++) {
      if (ch[i][0] == '+') {
        ans[cnt++] = arr[i];
        in[arr[i]] = true;
      } else {
        in[arr[i]] = false;
        while (cnt && in[ans[cnt - 1]] == false) cnt--;
      }
    }
    if (cnt) ok = false;
    if (k >= 0 && k + 1 < m && arr[k] != arr[k + 1]) ok = false;
    int x;
    if (k >= 0) x = arr[k];
    if (k + 1 < m) x = arr[k + 1];
    for (int i = k + 1; ok && i < m; i++) {
      if (ch[i][0] == '+') {
        ans[cnt++] = arr[i];
        in[arr[i]] = true;
      } else {
        in[arr[i]] = false;
        while (cnt > 0 && in[ans[cnt - 1]] == false) cnt--;
        if (arr[i] == x && cnt) ok = false;
        if (cnt == 0 && i + 1 < m && arr[i] != arr[i + 1]) ok = false;
      }
    }
    if (ok && x > 0) vis[x] = true;
    cnt = 0;
    for (int i = 1; i <= n; i++)
      if (vis[i]) ans[cnt++] = i;
    cout << cnt << endl;
    for (int i = 0; i < cnt; i++) {
      if (i) printf(" ");
      printf("%d", ans[i]);
    }
    if (cnt) puts("");
  }
  return 0;
}
