#include <bits/stdc++.h>
using namespace std;
long long int mod = 1e9 + 7;
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a[i]--;
  }
  vector<bool> v(n + 1);
  int cnt = n;
  for (int i = 0; i < n; i++) {
    if (v[i]) continue;
    int p = i;
    while (!v[p]) {
      v[p] = true;
      p = a[p];
    }
    cnt--;
  }
  cnt %= 2;
  if (n % 2 == cnt) {
    cout << "Petr" << endl;
  } else {
    cout << "Um_nik" << endl;
  }
  return 0;
}
