#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n, p[1000005], count1 = 0, used[1000005];
int main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    used[p[i]] = i;
  }
  while (1) {
    int check1 = 0;
    for (int i = 1; i <= n; i++) {
      if (p[i] != i) {
        check1 = 1;
        break;
      }
    }
    if (check1 == 0) break;
    for (int i = 1; i <= n; i++) {
      if (i == p[i]) continue;
      used[p[i]] = used[i];
      swap(p[i], p[used[i]]);
      used[i] = i;
      count1++;
    }
  }
  if (abs(3 * n - count1) % 2 == 0)
    cout << "Petr\n";
  else
    cout << "Um_nik\n";
}
