#include <bits/stdc++.h>
using namespace std;
int a[1000010];
int idx[1000010];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i], idx[a[i]] = i;
  int cot = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i] != i) {
      a[idx[i]] = a[i];
      idx[a[i]] = idx[i];
      cot++;
    }
  }
  if ((cot + 3 * n) & 1) {
    cout << "Um_nik" << endl;
  } else {
    cout << "Petr" << endl;
  }
  return 0;
}
