#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5, M = 1e3 + 5, mo = 1e9 + 7;
int n, a[N], i, cnt, pd[N], x;
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", a + i);
  for (i = 1; i <= n; i++)
    if (!pd[i]) {
      x = i;
      while (1) {
        pd[x] = 1;
        x = a[x];
        cnt++;
        if (x == i) break;
      }
      cnt--;
    }
  if (3 * n - cnt & 1)
    printf("Um_nik\n");
  else
    printf("Petr\n");
}
