#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int m[n];
  for (int(i) = 0; (i) < (n); (i)++) {
    cin >> a[i];
    a[i]--;
    m[a[i]] = i;
  }
  int c = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] != i) {
      int temp = a[i];
      a[i] = i;
      a[m[i]] = temp;
      m[temp] = m[i];
      m[i] = i;
      c++;
    }
  }
  if (n & 1) {
    if (c & 1)
      cout << "Petr";
    else
      cout << "Um_nik";
  } else {
    if (c & 1)
      cout << "Um_nik";
    else
      cout << "Petr";
  }
  return 0;
}
