#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n + 1);
  for (long long i = 1; i <= n; i++) cin >> a[i];
  bool ans = false;
  for (long long i = 1; i <= n; i++) {
    if (a[i] == 0) continue;
    ans = !ans;
    long long x = i;
    while (x != 0) {
      long long y = a[x];
      a[x] = 0;
      x = y;
    }
  }
  cout << (ans ? "Um_nik" : "Petr") << '\n';
}
