#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int s[N];
int n;
int Run() {
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    while (s[i] != i) {
      swap(s[i], s[s[i]]);
      ans++;
    }
  }
  return ans;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &s[i]);
  }
  int cnt = Run();
  if (abs(3 * n - cnt) & 1) {
    puts("Um_nik");
    return 0;
  } else {
    puts("Petr");
    return 0;
  }
}
