#include <bits/stdc++.h>
using namespace std;
int a[1000010], b[1000010], wei[1000010], cnt;
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = i;
    wei[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (wei[a[i]] != i) {
      swap(wei[a[i]], wei[b[i]]);
      b[wei[b[i]]] = b[i], b[i] = a[i];
      cnt++;
    }
  }
  if (cnt % 2 == n % 2)
    printf("Petr\n");
  else
    printf("Um_nik\n");
  return 0;
}
