#include <bits/stdc++.h>
using namespace std;
class Solution {
 public:
  void solve(int num, std::istream& in, std::ostream& out) {
    int n;
    in >> n;
    vector<int> arr(n);
    for (int i = 0; i < n; i++) {
      in >> arr[i];
      arr[i]--;
    }
    int x = 0;
    for (int i = 0; i < n; i++) {
      while (arr[i] != i) {
        int y = arr[i];
        int z = arr[y];
        arr[y] = y;
        arr[i] = z;
        x++;
      }
    }
    if (n % 2 == 0) {
      if (x % 2 == 0)
        out << "Petr";
      else
        out << "Um_nik";
    } else {
      if (x % 2 != 0)
        out << "Petr";
      else
        out << "Um_nik";
    }
  }
};
void solve(std::istream& in, std::ostream& out) {
  out << std::setprecision(12);
  Solution solution;
  solution.solve(0, in, out);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  istream& in = cin;
  ostream& out = cout;
  solve(in, out);
  return 0;
}
