#include <bits/stdc++.h>
using namespace std;
int num[1000003], ct, n;
void swap(int &a, int &b) {
  a ^= b;
  b ^= a;
  a ^= b;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n;
  for (register int i = 1; i <= n; i++) {
    cin >> num[i];
  }
  for (register int i = 1; i <= n; i++) {
    while (num[i] != i) {
      swap(num[i], num[num[i]]);
      ct++;
    }
  }
  if ((ct & 1) == (n & 1)) {
    cout << "Petr";
  } else {
    cout << "Um_nik";
  }
  return 0;
}
