{"raw_statement":[{"iden":"statement","content":"Petr likes to come up with problems about randomly generated data. This time problem is about random permutation. He decided to generate a random permutation this way: he takes identity permutation of numbers from $1$ to $n$ and then $3n$ times takes a random pair of different elements and swaps them. Alex envies Petr and tries to imitate him in all kind of things. Alex has also come up with a problem about random permutation. He generates a random permutation just like Petr but swaps elements $7n+1$ times instead of $3n$ times. Because it is more random, OK?!\n\nYou somehow get a test from one of these problems and now you want to know from which one."},{"iden":"input","content":"In the first line of input there is one integer $n$ ($10^{3} \\le n \\le 10^{6}$).\n\nIn the second line there are $n$ distinct integers between $1$ and $n$ — the permutation of size $n$ from the test.\n\nIt is guaranteed that all tests except for sample are generated this way: First we choose $n$ — the size of the permutation. Then we randomly choose a method to generate a permutation — the one of Petr or the one of Alex. Then we generate a permutation using chosen method."},{"iden":"output","content":"If the test is generated via Petr's method print \"_Petr_\" (without quotes). If the test is generated via Alex's method print \"_Um_nik_\" (without quotes)."},{"iden":"example","content":"Input\n\n5\n2 4 5 1 3\n\nOutput\n\nPetr"},{"iden":"note","content":"Please note that the sample is not a valid test (because of limitations for $n$) and is given only to illustrate input/output format. Your program **still has to print correct answer to this test** to get AC.\n\nDue to randomness of input hacks in this problem are forbidden."}],"translated_statement":[{"iden":"statement","content":"Petr 喜欢设计关于随机生成数据的问题。这次的问题是关于随机排列的。他决定用以下方式生成一个随机排列：从数字 $1$ 到 $n$ 的单位排列开始，然后进行 $3 n$ 次操作，每次随机选取两个不同的元素并交换它们。Alex 羡慕 Petr，试图在所有方面模仿他。Alex 也设计了一个关于随机排列的问题。他生成随机排列的方式与 Petr 相同，但交换元素的次数是 $7 n + 1$ 次，而不是 $3 n$ 次。因为这样更随机，对吧？！\n\n你偶然得到了一个来自上述两个问题之一的测试用例，现在你需要判断它来自哪一个。\n\n输入的第一行包含一个整数 $n$（$10^3 lt.eq n lt.eq 10^6$）。\n\n第二行包含 $n$ 个介于 $1$ 到 $n$ 之间的互不相同的整数——来自测试用例的大小为 $n$ 的排列。\n\n保证除了样例之外的所有测试用例均按以下方式生成：首先选择排列的大小 $n$，然后随机选择一种生成排列的方法——Petr 的方法或 Alex 的方法，再用所选方法生成排列。\n\n如果测试用例是通过 Petr 的方法生成的，请输出 \"_Petr_\"（不含引号）。如果是通过 Alex 的方法生成的，请输出 \"_Um_nik_\"（不含引号）。\n\n请注意，样例不是一个合法的测试用例（因为 $n$ 的限制），仅用于说明输入/输出格式。你的程序*仍必须为该样例输出正确答案*才能通过。\n\n由于输入具有随机性，本题禁止黑客攻击。"},{"iden":"input","content":"在输入的第一行有一个整数 $n$（$10^3 lt.eq n lt.eq 10^6$）。在第二行有 $n$ 个介于 $1$ 到 $n$ 之间的互不相同的整数——来自测试用例的大小为 $n$ 的排列。保证除了样例之外的所有测试用例均按以下方式生成：首先选择排列的大小 $n$，然后随机选择一种生成排列的方法——Petr 的方法或 Alex 的方法，再用所选方法生成排列。"},{"iden":"output","content":"如果测试用例是通过 Petr 的方法生成的，请输出 \"_Petr_\"（不含引号）。如果是通过 Alex 的方法生成的，请输出 \"_Um_nik_\"（不含引号）。"},{"iden":"note","content":"请注意，样例不是一个合法的测试用例（因为 $n$ 的限制），仅用于说明输入/输出格式。你的程序*仍必须为该样例输出正确答案*才能通过。由于输入具有随机性，本题禁止黑客攻击。"}],"sample_group":[],"show_order":[],"formal_statement":"Let $ \\pi $ be a permutation of $ \\{1, 2, \\dots, n\\} $, obtained by starting from the identity permutation and applying $ k $ random transpositions (swaps of two distinct elements).\n\nLet $ c $ be the number of cycles in the cycle decomposition of $ \\pi $.\n\nThe parity of the permutation $ \\pi $ is determined by the number of transpositions $ k $:  \n- Each transposition changes the parity of the permutation.  \n- The identity permutation has even parity (0 transpositions).  \n- After $ k $ transpositions, the parity of $ \\pi $ is $ k \\mod 2 $.\n\nThe number of cycles $ c $ in a permutation of $ n $ elements satisfies:  \n$$\n\\text{parity of } \\pi = (n - c) \\mod 2\n$$\n\nThus:  \n$$\nk \\equiv n - c \\pmod{2}\n$$\n\nGiven:\n- Petr uses $ k = 3n $\n- Alex uses $ k = 7n + 1 $\n\nCompute $ c $ from the input permutation.\n\nThen:\n- If $ 3n \\equiv n - c \\pmod{2} $, output \"Petr\"\n- Else, output \"Um_nik\"\n\nSimplify the parity conditions:\n\nFor Petr:  \n$ 3n \\equiv n - c \\pmod{2} \\Rightarrow 2n \\equiv -c \\pmod{2} \\Rightarrow 0 \\equiv c \\pmod{2} \\Rightarrow c \\text{ even} $\n\nFor Alex:  \n$ 7n + 1 \\equiv n - c \\pmod{2} \\Rightarrow 6n + 1 \\equiv -c \\pmod{2} \\Rightarrow 1 \\equiv -c \\pmod{2} \\Rightarrow c \\equiv 1 \\pmod{2} \\Rightarrow c \\text{ odd} $\n\nTherefore:\n\n> If the number of cycles $ c $ in the permutation is even → Petr  \n> If $ c $ is odd → Um_nik\n\n---\n\n**Formal Output:**\n\nLet $ c $ be the number of cycles in the cycle decomposition of the given permutation.\n\nIf $ c \\equiv 0 \\pmod{2} $, output \"Petr\".  \nIf $ c \\equiv 1 \\pmod{2} $, output \"Um_nik\".","simple_statement":null,"has_page_source":false}