#include <bits/stdc++.h>
inline int getInt() {
  int s;
  scanf("%d", &s);
  return s;
}
using namespace std;
class BIT {
  vector<int> bit;

 public:
  BIT(int n) : bit(n + 1) {}
  void add(int idx, int val) {
    idx++;
    while (idx < (int)bit.size()) {
      bit[idx] += val;
      idx += idx & -idx;
    }
  }
  int sum(int i) {
    int s = 0;
    i++;
    while (i > 0) {
      s += bit[i];
      i -= i & -i;
    }
    return s;
  }
};
int calcPos(int pos, int len, BIT &bit) {
  int high = len - 1;
  int low = 0;
  while (low <= high) {
    const int mid = (low + high) / 2;
    if (mid - bit.sum(mid) < pos) {
      low = mid + 1;
    } else {
      high = mid - 1;
    }
  }
  return low;
}
int main() {
  const int n = getInt();
  const int m = getInt();
  vector<int> a(m);
  BIT bit(2 * n);
  vector<int> s;
  s.reserve(n);
  for (int i = 0; i < (int)(m); i++) a[i] = getInt() - 1;
  for (int i = 0; i < (int)(n); i++) {
    const int q = getInt();
    if (q == -1) {
      for (int j = 0; j < (int)(m); j++) {
        const int pos = calcPos(a[j] - j, s.size(), bit);
        if (pos >= (int)s.size()) break;
        s[pos] = -1;
        bit.add(pos, 1);
      }
    } else if (q == 0) {
      s.push_back(0);
    } else {
      s.push_back(1);
    }
  }
  bool ok = false;
  for (int i = 0; i < (int)(s.size()); i++)
    if (s[i] != -1) {
      printf("%d", s[i]);
      ok = true;
    }
  if (!ok) printf("Poor stack!");
  puts("");
  return 0;
}
