#include <bits/stdc++.h>
using namespace std;
double PI = 4.00 * (atan(1));
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int vertice;
  cin >> vertice;
  bool visit[vertice + 1];
  long long int arr1[vertice + 1];
  for (long long int i = 1; i <= vertice; i++) {
    cin >> arr1[i];
    visit[i] = false;
  }
  long long int store, len;
  vector<long long int> cycle;
  for (long long int i = 1; i <= vertice; i++) {
    if (visit[i]) {
      continue;
    }
    if (arr1[i] == i) {
      continue;
    }
    store = arr1[i];
    len = 2;
    visit[i] = true;
    visit[store] = true;
    while (1) {
      store = arr1[store];
      if (store == i) {
        break;
      }
      visit[store] = true;
      len++;
    }
    len--;
    cycle.push_back(len);
  }
  long long int sum = 0, size;
  size = cycle.size();
  for (long long int i = 0; i < size; i++) {
    sum += cycle[i];
  }
  bool even;
  if (sum % 2 == 1) {
    even = false;
  } else {
    even = true;
  }
  if (vertice % 2 == 0) {
    if (even) {
      cout << "Petr";
    } else {
      cout << "Um_nik";
    }
  } else {
    if (!even) {
      cout << "Petr";
    } else {
      cout << "Um_nik";
    }
  }
  return 0;
}
