#include <bits/stdc++.h>
using namespace std;
const int N = 1000001;
int a[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], --a[i];
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == -1) continue;
    ans ^= 1;
    int x = i;
    while (x != -1) {
      int y = a[x];
      a[x] = -1;
      x = y;
    }
  }
  if (ans)
    cout << "Um_nik\n";
  else
    cout << "Petr\n";
  return 0;
}
