#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
const long long int INF = 1e9;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  int t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    vector<long long int> a(n + 1), traversed(n + 1, 0);
    long long int cycles = 0, curr = 0;
    for (long long int i = 1; i <= n; i++) {
      cin >> a[i];
    }
    for (long long int i = 1; i <= n; i++) {
      if (traversed[a[i]] != 1) {
        long long int pos = a[i];
        cycles++;
        while (traversed[pos] != 1) {
          traversed[pos] = 1;
          pos = a[pos];
        }
      }
    }
    if (cycles % 2 == 0)
      cout << "Petr" << '\n';
    else
      cout << "Um_nik" << '\n';
  }
  return 0;
}
