#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, p[N], vis[N];
int main() {
  int ans = 0;
  scanf("%d", &n);
  for (int i = (1); i <= (n); ++i) scanf("%d", &p[i]);
  for (int i = (1); i <= (n); ++i)
    if (!vis[i]) {
      int tmp = i;
      ++ans;
      while (!vis[tmp]) vis[tmp] = 1, tmp = p[tmp];
    }
  ans = n - ans;
  puts((ans & 1) == ((3 * n) & 1) ? "Petr" : "Um_nik");
  return 0;
}
