#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:836777216")
using namespace std;
int a[1000005];
bool used[1000005];
int n;
int cnt = 0;
int main(void) {
  scanf("%d", &n);
  for (int(i) = 0; (i) < (n); (i)++) {
    scanf("%d", &a[i]);
  }
  memset((used), (0), sizeof((used)));
  for (int(i) = 0; (i) < (n); (i)++) {
    if (used[i]) {
      continue;
    }
    if (a[i] == i + 1) {
      cnt++;
      used[i] = 1;
      continue;
    }
    int cur = a[i] - 1;
    while (!used[cur]) {
      used[cur] = 1;
      cur = a[cur] - 1;
    }
    cnt++;
  }
  if (cnt % 2) {
    printf("Um_nik\n");
  } else {
    printf("Petr\n");
  }
}
