#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7;
int a[N];
bool used[N];
void dfs(int x) {
  if (used[x]) return;
  used[x] = true;
  dfs(a[x]);
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  int ans = n;
  for (int i = 1; i <= n; ++i) {
    if (!used[i]) {
      --ans;
      dfs(i);
    }
  }
  if (n % 2 == ans % 2)
    cout << "Petr";
  else
    cout << "Um_nik";
}
