#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], ans, id[1000005];
void readf() {
  cin >> n;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
}
void solve() {
  ans = 0;
  for (int i = (1); i <= (n); ++i) id[a[i]] = i;
  for (int i = (1); i <= (n); ++i)
    if (a[i] != i) {
      id[a[i]] = id[i];
      swap(a[i], a[id[i]]);
      ans++;
    }
  if ((3 * n - ans) & 1)
    cout << "Um_nik";
  else
    cout << "Petr";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  readf();
  solve();
}
