#include <bits/stdc++.h>
const int MAXN = 1000005;
int main() {
  int n, swps = 0;
  static int a[MAXN], b[MAXN];
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
    b[a[i]] = i;
  }
  for (int i = 1; i <= n; ++i) {
    if (a[i] == i) continue;
    b[a[i]] = b[i];
    {
      int ttt = (a[i]);
      (a[i]) = (a[b[i]]);
      (a[b[i]]) = ttt;
    };
    swps++;
  }
  if ((swps & 1) == ((3 * n) & 1))
    printf("Petr");
  else
    printf("Um_nik");
  return 0;
}
