#include <bits/stdc++.h>
using namespace std;
int main() {
  std::cin.tie(0);
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> v(n);
  set<int> se;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    v[i]--;
  }
  int x, ans = 0, y;
  for (int i = 0; i < n; i++) {
    if (v[i] != -1) {
      ans++;
      x = i;
      while (x != -1) {
        y = v[x];
        v[x] = -1;
        x = y;
      }
    }
  }
  if (ans % 2)
    cout << "Um_nik" << endl;
  else
    cout << "Petr" << endl;
  return 0;
}
