SP3166 PERMSG - Permutation Exponentiation
Description
Alice, a permutation aficionado, has thought up a permutation of **N** (1
Input Format
The first line of input contains **N** (1
Output Format
Print **P**^**k** as a space separated list on its own line with as many elements as possible determined. If an element can't be determined leave it as -1. If there is no **k** such that **P**^**k** has the values given in the input print "Inconsistent" (quotes for clarity) on its own line instead.