#include <bits/stdc++.h>
using namespace std;
static int aQWEs = []() -> int {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  return 0;
}();
long long int power(long long int a, long long int p,
                    long long int m = 1000000007) {
  a %= m;
  long long int val = 1;
  while (p > 0) {
    if (p & 1) {
      val = (val * a) % m;
    }
    a = (a * a) % m;
    p >>= 1;
  }
  return (val);
}
int dfs(const vector<int>& v, std::vector<bool>& vis, int cur, int depth) {
  vis[cur] = 1;
  if (!vis[v[cur]]) return dfs(v, vis, v[cur], depth + 1);
  return depth;
}
int main() {
  long long int i, j;
  int T = 1;
  while (T--) {
    int n;
    cin >> n;
    std::vector<int> v(n + 1);
    std::vector<bool> vis(n + 1);
    int ans = 0;
    for (i = 1; i <= n; ++i) {
      cin >> v[i];
    }
    for (i = 1; i <= n; ++i) {
      if (!vis[i]) ans += dfs(v, vis, i, 0);
    }
    if (!((3 * n - ans) & 1)) {
      cout << "Petr\n";
    } else
      cout << "Um_nik\n";
  }
}
