{"trustable":true,"sections":[{"title":"Background","value":{"format":"MD","content":"This is a template problem"}},{"title":"Description","value":{"format":"MD","content":"Given $n,p$, find the multiplicative inverse of all integers in $1\\sim n$ under modulo $p$.\n\nHere, the multiplicative inverse of $a$ modulo $p$ is defined as the solution to $ax\\equiv1\\pmod p$."}},{"title":"Input","value":{"format":"MD","content":"A line with two positive integers $n,p$."}},{"title":"Output","value":{"format":"MD","content":"Output $n$ lines, where the $i$ line represents the multiplicative inverse of $i$ under modulo $p$."}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e10 13\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1\n7\n9\n10\n8\n11\n2\n5\n3\n4\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"Hint","value":{"format":"MD","content":"$ 1 \\leq n \\leq 3 \\times 10 ^ 6$, $n \u003c p \u003c 20000528 $.\n\nThe input guarantees that $ p $ is a prime number."}}]}