#include <bits/stdc++.h>
using namespace std;
namespace IO {
const int BUFFER_SIZE = 32768;
char input_buffer[BUFFER_SIZE];
int input_pos = BUFFER_SIZE;
int input_read = BUFFER_SIZE;
char output_buffer[BUFFER_SIZE];
int output_pos = 0;
uint8_t lookup[100];
void _update_input_buffer() {
  if (input_pos >= input_read && input_read == BUFFER_SIZE) {
    input_read = fread(input_buffer, sizeof(char), BUFFER_SIZE, stdin);
    input_pos = 0;
  }
}
char next_char(bool advance = true) {
  _update_input_buffer();
  return input_buffer[advance ? input_pos++ : input_pos];
}
template <typename T>
void read_int(T &number) {
  while (isspace(next_char(false))) next_char();
  bool negative = next_char(false) == '-';
  if (negative) next_char();
  number = 0;
  while (isdigit(next_char(false))) number = 10 * number + (next_char() - '0');
  if (negative) number = -number;
}
void flush_output() {
  fwrite(output_buffer, sizeof(char), output_pos, stdout);
  output_pos = 0;
}
void write_char(char c) {
  if (output_pos == BUFFER_SIZE) flush_output();
  output_buffer[output_pos++] = c;
}
template <typename T>
void write_int(T number, char after = 0) {
  if (number < 0) {
    write_char('-');
    number = -number;
  }
  static char number_buffer[100];
  int length = 0;
  do {
    if (number < 10) {
      number_buffer[length++] = number + '0';
      number = 0;
    } else {
      uint8_t lookup_value = lookup[number % 100];
      number /= 100;
      number_buffer[length++] = (lookup_value & 15) + '0';
      number_buffer[length++] = (lookup_value >> 4) + '0';
    }
  } while (number != 0);
  for (int i = length - 1; i >= 0; i--) write_char(number_buffer[i]);
  if (after) write_char(after);
}
void init() {
  bool exit_success = atexit(flush_output) == 0;
  assert(exit_success);
  for (int i = 0; i < 100; i++) lookup[i] = (i / 10 << 4) + i % 10;
}
}  // namespace IO
int main() {
  IO::init();
  int N;
  IO::read_int(N);
  vector<int> numbers(N + 1);
  for (int i = 1; i <= N; i++) IO::read_int(numbers[i]);
  vector<bool> visited(N + 1, false);
  int cycles = 0;
  for (int i = 1; i <= N; i++)
    if (!visited[i]) {
      cycles++;
      for (int j = i; !visited[j]; j = numbers[j]) visited[j] = true;
    }
  puts(cycles % 2 == 0 ? "Petr" : "Um_nik");
}
