#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0;
  cin >> n;
  vector<int> a(n), b(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (b[i] == 0) {
      int j = a[i] - 1, k = 0;
      b[i] = 1;
      while (b[j] == 0) {
        b[j] = 1;
        j = a[j] - 1;
        k++;
      }
      ans += k;
    }
  }
  if (n % 2 == ans % 2)
    cout << "Petr\n";
  else
    cout << "Um_nik\n";
  return 0;
}
