Dan works for a digital content protection company. The company protects the content of blu-ray discs under a standard called Anti Content Misuse (ACM).
The ACM standard works as follows. Suppose there are 2n blu-ray players. Each player is one leaf of a complete binary tree of height n, so every root to leaf path uses exactly n edges. Every node u of the tree carries an identifier number and holds a random key ku. Identifiers are assigned this way. The root r gets 1, and an internal node numbered i has left child 2i and right child 2i+1. This gives every node a distinct number. Blu-ray users never see the keys inside the nodes, but the manufacturers know them. Each player is identified by the number i (2n≤i≤2n+1−1) of its leaf, and the manufacturer embeds in player i every key on the path from the root to leaf i.
To encrypt a disc, the company generates a random key k called the master key. It encrypts k with the root key kr and writes the result on the disc as a header, then encrypts the content with k and writes the encrypted data on the disc. A player decrypts the header with its own copy of kr, recovers the master key k, and decrypts the content with k.
Hackers extracted the keys embedded in a set R of players and published them on the web, so none of those keys can protect the master key any more. Every player holds kr, so the scheme above is broken. The ACM standard covers this case. The header grows, but the content of a new disc stays safe. The company picks a set K of keys that were not exposed, such that every player outside R holds at least one key of K. It encrypts the master key k separately with each key k′∈K and puts the ∣K∣ ciphertexts in the header. Every player that was not hacked then decrypts at least one ciphertext of the header and recovers k. The smaller ∣K∣ is, the shorter the header. Given the identifiers of the hacked players, help Dan find a smallest K.
The input is a single test case on two lines. The first line contains two integers n and ∣R∣ (1≤n≤62, 1≤∣R∣≤1000), where ∣R∣ is the size of the set R of exposed players. The second line contains the ∣R∣ identifiers of the exposed players. At least one player was not hacked.
For a set K that meets the requirements above and has minimum size, print the identifiers of the nodes holding the keys of K in increasing order, separated by single spaces. Exactly one set of minimum size meets the requirements.