#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) cin >> a[i];
  int m = 0;
  for (int i = 1; i <= n; i++)
    if (a[i] > 0) {
      m++;
      while (a[i] > 0) {
        int t = a[i];
        a[i] = -1;
        i = t;
      }
    }
  cout << ((m & 1) ? "Um_nik" : "Petr");
  return 0;
}
