#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  srand(time(0));
  ios_base::sync_with_stdio(false);
  int64_t n;
  cin >> n;
  vector<int64_t> d(n), v(n);
  for (int64_t i = 0; i < n; ++i) {
    cin >> v[i];
    --v[i];
  }
  for (int64_t i = 0; i < n; ++i) d[v[i]] = i;
  int64_t cnt = 0;
  for (int64_t i = 0; i < n; ++i) {
    if (v[i] != i) {
      d[v[i]] = d[i];
      swap(v[i], v[d[i]]);
      ++cnt;
    }
  }
  bool ans = (cnt % 2) ^ (n % 2);
  cout << (ans ? "Um_nik" : "Petr");
}
