#include <bits/stdc++.h>
using namespace std;
int arr[1000000];
int swaps = 0;
int main() {
  int n;
  cin >> n;
  int answer = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    arr[i]--;
  }
  for (int i = 0; i < n; i++) {
    if (arr[i] == -1) continue;
    answer = (answer == 0) ? 1 : 0;
    int x = i;
    while (x != -1) {
      int y = arr[x];
      arr[x] = -1;
      x = y;
    }
  }
  if (!answer)
    cout << "Petr" << endl;
  else
    cout << "Um_nik" << endl;
  return 0;
}
