#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  int arr[n], m[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    arr[i]--;
    m[arr[i]] = i;
  }
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (i == arr[i]) continue;
    ans ^= 1;
    int a = arr[i], b = m[i];
    arr[b] = a;
    m[a] = b;
  }
  if ((3 * n - ans) % 2 == 1)
    cout << "Um_nik\n";
  else
    cout << "Petr\n";
}
