B. Petr and Permutations
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define syncfalse ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
const int N = 1e6+5;
int a[N], pos[N];
int main(){
syncfalse
#ifndef ONLINE_JUDGE
freopen("in.txt","r",stdin);
#endif
int n;
cin>>n;
for (int i = 1; i <= n; ++i){
cin>>a[i];
pos[a[i]]=i;
}
int cnt = 0;
for (int i = n; i >= 1; --i){
int id = pos[i];
if (id==i)continue;
else{
int val = a[i];
swap(a[i], a[id]);
pos[i]=i;
pos[val]=id;
cnt++;
}
}
int change1 = n*3, change2 = n*7+1;
if (cnt%2==change1%2)cout << "Petr\n";
else cout << "Um_nik\n";
return 0;
}