#include <bits/stdc++.h>
using namespace std;
int a[1000005];
bool u[1000005] = {};
int ans = 0;
void dfs(int now, int v, int len) {
  u[now] = 1;
  if (now == v) {
    ans += len;
    return;
  }
  dfs(a[now], v, len + 1);
}
int main() {
  int n;
  scanf("%d", &n);
  ;
  for (int i = 0; i < n; ++i) cin >> a[i + 1];
  for (int i = 1; i < n + 1; ++i) {
    if (a[i] == i || u[i]) continue;
    dfs(a[i], i, 0);
  }
  if ((ans + n) & 1) {
    puts("Um_nik");
  } else {
    puts("Petr");
  }
}
