#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
int main() {
  int n;
  int v[1000006];
  int pos[1000006];
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", v + i);
    pos[v[i]] = i;
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    if (v[i] != i) {
      int x = pos[i];
      swap(v[i], v[pos[i]]);
      ans++;
      pos[v[i]] = i;
      pos[v[x]] = x;
    }
  }
  if (n & 1) {
    if (ans & 1)
      printf("Petr\n");
    else
      printf("Um_nik\n");
  } else {
    if (ans & 1)
      printf("Um_nik\n");
    else
      printf("Petr\n");
  }
  return 0;
}
