#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int l[n];
  for (int k = 0; k < n; ++k) {
    cin >> l[k];
  }
  int cycles = 0;
  int i = 0;
  while (i < n) {
    bool cycle_marked = false;
    while (l[i] != 0) {
      if (!cycle_marked) {
        cycles += 1;
        cycle_marked = true;
      }
      int i_prev = i;
      i = l[i] - 1;
      l[i_prev] = 0;
    }
    i += 1;
  }
  int c = n - cycles;
  if (n % 2 == c % 2) {
    cout << "Petr" << endl;
  } else {
    cout << "Um_nik" << endl;
  }
}
