#include <bits/stdc++.h>
using namespace std;
const int MX = 1e6 + 9;
int n, a[MX], vis[MX], res, ans;
void dfs(int x) {
  if (vis[x]) return;
  vis[x] = 1;
  res++;
  dfs(a[x]);
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i]) continue;
    res = 0;
    dfs(i);
    ans += res - 1;
  }
  n -= ans;
  if (n % 2 == 0) {
    puts("Petr");
  } else
    puts("Um_nik");
}
