#include <bits/stdc++.h>
using namespace std;
const int MX = 1e6 + 10, MD = 1e9 + 7;
long long n, m, a[MX], mp[MX], ans, tmp, b[MX];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = i;
    mp[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == i) continue;
    mp[a[i]] = mp[i];
    a[mp[i]] = a[i];
    a[i] = i;
    ans++;
  }
  if (n % 2 == 1) {
    if (ans % 2 == 1) {
      cout << "Petr" << endl;
    } else {
      cout << "Um_nik" << endl;
    }
  } else {
    if (ans % 2 == 0) {
      cout << "Petr" << endl;
    } else {
      cout << "Um_nik" << endl;
    }
  }
}
