#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
int idx[1000010], arr[1000010];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (long long i = (1); i < (n + 1); ++i) {
    cin >> arr[i];
    idx[arr[i]] = i;
  }
  int cnt = 0;
  for (long long i = (1); i < (n + 1); ++i)
    if (idx[i] != i) {
      ++cnt;
      idx[arr[i]] = idx[i];
      int temp = arr[idx[i]];
      arr[idx[i]] = arr[i];
      arr[i] = temp;
      idx[i] = i;
    }
  if ((cnt + 3 * n) & 1)
    cout << "Um_nik" << '\n';
  else
    cout << "Petr" << '\n';
  return 0;
}
