While Patrick was gone shopping, Spongebob decided to play a little trick on his friend. The naughty Sponge browsed through Patrick's personal stuff and found a sequence a1, a2, ..., am of length m, consisting of integers from 1 to n, not necessarily distinct. Then he picked some sequence f1, f2, ..., fn of length n and for each number ai got number bi = fai. To finish the prank he erased the initial sequence ai.

It's hard to express how sad Patrick was when he returned home from shopping! We will just say that Spongebob immediately got really sorry about what he has done and he is now trying to restore the original sequence. Help him do this or determine that this is impossible.

Input

The first line of the input contains two integers n and m (1 ≤ n, m ≤ 100 000) — the lengths of sequences fi and bi respectively.

The second line contains n integers, determining sequence f1, f2, ..., fn (1 ≤ fi ≤ n).

The last line contains m integers, determining sequence b1, b2, ..., bm (1 ≤ bi ≤ n).

Output

Print "Possible" if there is exactly one sequence ai, such that bi = fai for all i from 1 to m. Then print m integers a1, a2, ..., am.

If there are multiple suitable sequences ai, print "Ambiguity".

If Spongebob has made a mistake in his calculations and no suitable sequence ai exists, print "Impossible".

Examples

Input

3 3
3 2 1
1 2 3


Output

Possible
3 2 1 


Input

3 3
1 1 1
1 1 1


Output

Ambiguity


Input

3 3
1 2 1
3 3 3


Output

Impossible

Note

In the first sample 3 is replaced by 1 and vice versa, while 2 never changes. The answer exists and is unique.

In the second sample all numbers are replaced by 1, so it is impossible to unambiguously restore the original sequence.

In the third sample fi ≠ 3 for all i, so no sequence ai transforms into such bi and we can say for sure that Spongebob has made a mistake.
def BuildHashTable(n,f):
  
    # Initializing HashTable - htab
    htab = []
    for i in range(n):
        htab[len(htab):] = [[0,-1]]

    # Parsing sequence f to update htab
    for i in range(n):
        j = f[i]    # setting the value of current element of sequence f
        
        # Updating occurrence of current value in hash table
        htab[j-1][0] = htab[j-1][0] + 1

        # Updating the position of current value in hash table
        # if value isn't found in f, position is -1.
        # else if value is found only once in f, set the position to its index
        # else (value is found multiple times in f), set the position to -2		
        if htab[j-1][1] == -1:
            htab[j-1][1] = i + 1
        else:
            htab[j-1][1] = -2

    return htab
    
def LookupAndTell(htab, b):
    # Function to look up the sequence B and tell us if it is present in F or not using HashTable

    # status = 0  # status decides if a termination condition has been reached halfway -- This is wrong condition to check. Must go till the end of sequence
    
    state = 1
    i = 0
    a = [0]*len(b)  # Initialize output sequence A
    
    while (i < len(b) and state != 0):
        j = b[i]   # Setting the lookup value from sequence B
        
        if (htab[j-1][0] == 0):
            # Case when current element of B is not present in F
            print ('Impossible')
            state = 0
        elif (htab[j-1][1] < -1):
            # Case when current element of B is present in F but occurs in multiple positions leading to ambiguity
            state = 2
        else:
            # Case when current element of B is uniquely present in F
            a[i] = htab[j-1][1]
        
        i = i + 1
    
    # Print output for the cases when sequence A exists
    if (state == 1 ):
        print ('Possible')
        print (' '.join(map(str, a)))
    elif (state == 2):
        print ('Ambiguity')
    
    return

def main():
    # Receiving inputs
    n,m = map(int, input().split( ))
    f = list(map(int, input().split( )))
    b = list(map(int, input().split( )))
    
    # Solving the problem
    h = BuildHashTable(n,f)
    LookupAndTell(h, b)

if __name__ == '__main__':
    main()
