#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
using namespace std;
const int mxN = 1e6 + 5;
template <class T>
T gcd(T a, T b) {
  return ((b == 0) ? a : gcd(b, a % b));
}
int pos[mxN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n + 1);
  for (int i = (int)(1); i < (int)(n + 1); i++) cin >> a[i], pos[a[i]] = i;
  int ans = 0;
  for (int i = (int)(1); i < (int)(n + 1); i++) {
    if (a[i] != i) {
      ans++;
      pos[a[i]] = pos[i];
      swap(a[i], a[pos[i]]);
    }
  }
  if ((ans & 1) == ((3 * n) & 1))
    cout << "Petr" << endl;
  else
    cout << "Um_nik" << endl;
  return 0;
}
