#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
void print(T1 a[], T2 n) {
  for (T2 i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
template <class T1, class T2>
void print(vector<T1> a, T2 n) {
  for (T2 i = 0; i < n; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
long long int modexpo(long long int a, long long int b, long long int m) {
  if (b == 0) {
    return 1;
  } else if (a == 1) {
    return 1;
  }
  if (b % 2 == 0) {
    long long int t = modexpo(a, b / 2, m);
    t = (t * t) % m;
    return t;
  } else {
    long long int t = modexpo(a, b / 2, m);
    t = (t * t) % m;
    t = (t * a) % m;
    return t;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int visited[n + 1];
  memset(visited, 0, sizeof(visited));
  int t = 0;
  for (int i = 1; i <= n; i++) {
    if (visited[i] == 0) {
      int c = i;
      int cnt = 0;
      while (visited[c] != 1) {
        visited[c] = 1;
        c = a[c];
        cnt++;
      }
      t += (cnt - 1);
    }
  }
  if (t % 2 == ((3 * n) % 2)) {
    cout << "Petr\n";
  } else {
    cout << "Um_nik\n";
  }
}
