#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k = 0;
  cin >> n;
  int p[n];
  for (i = 0; i < n; i++) {
    cin >> p[i];
    p[i]--;
  }
  for (i = 0; i < n; i++) {
    while (true) {
      if (p[i] != i) {
        j = p[i];
        p[i] = p[j];
        p[j] = j;
        k++;
      } else {
        break;
      }
    }
  }
  if (n % 2 == 0) {
    if (k % 2 == 0) {
      cout << "Petr";
    } else {
      cout << "Um_nik";
    }
  } else {
    if (k % 2 == 0) {
      cout << "Um_nik";
    } else {
      cout << "Petr";
    }
  }
}
