#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  vector<bool> used(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    v[i]--;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (used[i]) {
      continue;
    }
    cnt++;
    used[i] = 1;
    int cur = v[i];
    while (cur != i) {
      used[cur] = 1;
      cur = v[cur];
    }
  }
  cnt = n - cnt;
  if (n % 2 == 0) {
    if (cnt % 2 == 0) {
      cout << "Petr" << endl;
    } else {
      cout << "Um_nik" << endl;
    }
  } else {
    if (cnt % 2 == 0) {
      cout << "Um_nik" << endl;
    } else {
      cout << "Petr" << endl;
    }
  }
}
