#include <bits/stdc++.h>
using namespace std;
int arr[1000005];
int main() {
  int n, ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  for (int i = 1; i <= n; i++) {
    while (arr[i] != i) {
      swap(arr[arr[i]], arr[i]);
      ans++;
    }
  }
  if ((n & 1) == (ans & 1))
    cout << "Petr";
  else
    cout << "Um_nik";
}
