#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
int n;
int a[1000006];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    mp[a[i]] = i;
  }
  int s = 0;
  for (int i = 1; i <= n; i++) {
    if (mp[i] != i) {
      int temp = a[i];
      mp[temp] = mp[i];
      mp[i] = i;
      a[i] = i;
      a[mp[temp]] = temp;
      s++;
    }
  }
  if ((3 * n - s) % 2 == 0)
    cout << "Petr";
  else
    cout << "Um_nik";
}
