#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int inf = 1e9 + 7;
const long long longinf = 1LL << 60;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int cnt, a[1010101];
void dfs(int k) {
  if (a[k] == k) return;
  swap(a[k], a[a[k]]);
  cnt++;
  dfs(k);
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < (int)(n); i++) {
    scanf("%d", &a[i]);
    a[i]--;
  }
  for (int i = 0; i < (int)(n); i++) dfs(i);
  if ((cnt + n) % 2 == 0)
    cout << "Petr" << endl;
  else
    cout << "Um_nik" << endl;
  return 0;
}
