#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 0, n;
  cin >> n;
  int arr[n + 1], pos[n + 1];
  arr[0] = 0;
  pos[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    pos[arr[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (arr[i] != i) {
      pos[arr[i]] = pos[i];
      arr[pos[i]] = arr[i];
      arr[i] = i;
      pos[i] = i;
      k++;
    }
  }
  k = 3 * n - k;
  if (k % 2 == 0) {
    cout << "Petr";
  } else {
    cout << "Um_nik";
  }
  return 0;
}
