#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n;
vector<int> p;
pair<int, int> get_data() {
  int insta = 0;
  int unmoved = 0;
  for (int i = 0; i < n; i++) {
    if (p[i] == i) unmoved++;
    if (i == p[p[i]]) insta++;
  }
  return {unmoved, insta};
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n;
  int score_a = 0;
  int tests = 3;
  int score_b = 0;
  for (int i = 0; i < n; i++) p.push_back(i);
  for (int t = 0; t < tests; t++) {
    sort(p.begin(), p.end());
    for (int i = 0; i < n * 3; i++) {
      int x = rng() % n;
      int y = rng() % n;
      swap(p[x], p[y]);
    }
    pair<int, int> ans = get_data();
    score_a += ans.first + ans.second;
  }
  for (int t = 0; t < tests; t++) {
    sort(p.begin(), p.end());
    for (int i = 0; i < n * 7; i++) {
      int x = rng() % n;
      int y = rng() % n;
      swap(p[x], p[y]);
    }
    pair<int, int> ans = get_data();
    score_b += ans.first + ans.second;
  }
  long double score_middle =
      (long double)(score_a + score_b) / (long double)(tests) / 4.0;
  p.clear();
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    x--;
    p.push_back(x);
  }
  auto pa = get_data();
  if (pa.first + pa.second > score_middle) {
    cout << "Petr";
  } else {
    cout << "Um_nik";
  }
}
