#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:336777216")
using namespace std;
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, 1, -1};
int ddx[8] = {0, 0, 1, 1, 1, -1, -1, -1}, ddy[8] = {1, -1, 1, 0, -1, 1, 0, -1};
long long MOD = 1000000000;
long long POW(long long a, long long b, long long MMM = MOD) {
  long long ret = 1;
  for (; b; b >>= 1, a = (a * a) % MMM)
    if (b & 1) ret = (ret * a) % MMM;
  return ret;
}
long long GCD(long long a, long long b) { return b ? GCD(b, a % b) : a; }
long long LCM(long long a, long long b) {
  if (a == 0 || b == 0) return a + b;
  return a * (b / GCD(a, b));
}
long long INV(long long a, long long m) {
  long long m0 = m, y = 0, x = 1;
  if (m == 1) return 0;
  while (a > 1) {
    long long q = a / m;
    long long t = m;
    m = a % m, a = t;
    t = y;
    y = x - q * y;
    x = t;
  }
  if (x < 0) x += m0;
  return x;
}
pair<long long, long long> EXGCD(long long a, long long b) {
  if (b == 0) return {1, 0};
  auto t = EXGCD(b, a % b);
  return {t.second, t.first - t.second * (a / b)};
}
bool OOB(long long x, long long y, long long N, long long M) {
  return 0 > x || x >= N || 0 > y || y >= M;
}
int N;
int A[1000006];
int Visited[1000006];
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = 1; i < N + 1; i++) cin >> A[i];
  int tot = 0;
  for (int i = 1; i < N + 1; i++) {
    if (Visited[i]) continue;
    Visited[i] = true;
    int cycle = A[i];
    Visited[cycle] = true;
    while (cycle != i) {
      cycle = A[cycle];
      Visited[cycle] = true;
      tot++;
    }
  }
  if (tot % 2 == (N % 2))
    cout << ("Petr") << ' ';
  else
    cout << ("Um_nik") << ' ';
}
