#include <bits/stdc++.h>
using namespace std;
long long int pos[1000005], arr[1000005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, i, cnt;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> arr[i];
    pos[arr[i]] = i;
  }
  cnt = 0;
  for (i = 1; i <= n; i++) {
    if (pos[i] != i) {
      cnt++;
      arr[pos[i]] = arr[i];
      pos[arr[i]] = pos[i];
      arr[i] = i;
      pos[i] = i;
    }
  }
  if ((3 * n - cnt) % 2 == 0)
    cout << "Petr";
  else
    cout << "Um_nik";
}
