#include <bits/stdc++.h>
using namespace std;
int n, a[1000005], nr1, nr2, b[1000005], poz1, poz2, p, x, nr, y;
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  srand(time(0));
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (int i = 1; i <= n; i++)
    if (a[i] != -1) {
      x = i;
      while (a[x] != -1) {
        y = x;
        x = a[x];
        a[y] = -1;
      }
      nr++;
      p = 1 - p;
    }
  if (!p)
    cout << "Petr";
  else
    cout << "Um_nik";
}
