#include <bits/stdc++.h>
using namespace std;
int ara[1000105];
int pos[1000105];
bool vis[1000105];
int n;
int dfs(int nd, int depth) {
  vis[nd] = true;
  if (!vis[pos[nd]]) return 1 + dfs(pos[nd], 1 + depth);
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
    pos[ara[i]] = i;
  }
  int sum = 0;
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      sum += dfs(i, 1);
      sum--;
    }
  }
  if (((sum & 1)) == (n & 1))
    puts("Petr");
  else
    puts("Um_nik");
  return 0;
}
