#include <bits/stdc++.h>
using namespace std;
int a[1000005];
int b[1000005];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[a[i]] = i;
  }
  int sum = 0;
  for (int j = 1; j <= n; j++) {
    if (a[j] != j) {
      a[b[j]] = a[j];
      b[a[j]] = b[j];
      sum++;
    }
  }
  if ((sum + 3 * n) & 1) {
    cout << "Um_nik" << endl;
  } else
    cout << "Petr" << endl;
  return 0;
}
