#include <bits/stdc++.h>
using namespace std;
long long int minswaps(long long int arr[], long long int n) {
  pair<int, int> arrpos[n];
  for (long long int i = 0; i < n; i++) {
    arrpos[i].first = arr[i];
    arrpos[i].second = i;
  }
  sort(arrpos, arrpos + n);
  vector<bool> vis(n, false);
  long long int ans = 0;
  for (long long int i = 0; i < n; i++) {
    if (vis[i] || arrpos[i].second == i) continue;
    long long int cycle_size = 0;
    int j = i;
    while (!vis[j]) {
      vis[j] = true;
      j = arrpos[j].second;
      cycle_size++;
    }
    ans += (cycle_size - 1);
  }
  return ans;
}
int main() {
  long long int n;
  cin >> n;
  long long int arr[n];
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  long long int swaps = minswaps(arr, n);
  if ((((3 * n) - swaps) % 2) == 0)
    cout << "Petr";
  else
    cout << "Um_nik";
}
