Problem: Chouti and his classmates are going to the university soon. To say goodbye to each other, the class has planned a big farewell party in which classmates, teachers and parents sang and danced.

Chouti remembered that n persons took part in that party. To make the party funnier, each person wore one hat among n kinds of weird hats numbered 1, 2, … n. It is possible that several persons wore hats of the same kind. Some kinds of hats can remain unclaimed by anyone.

After the party, the i-th person said that there were a_i persons wearing a hat differing from his own.

It has been some days, so Chouti forgot all about others' hats, but he is curious about that. Let b_i be the number of hat type the i-th person was wearing, Chouti wants you to find any possible b_1, b_2, …, b_n that doesn't contradict with any person's statement. Because some persons might have a poor memory, there could be no solution at all.

Input

The first line contains a single integer n (1 ≤ n ≤ 10^5), the number of persons in the party.

The second line contains n integers a_1, a_2, …, a_n (0 ≤ a_i ≤ n-1), the statements of people.

Output

If there is no solution, print a single line "Impossible".

Otherwise, print "Possible" and then n integers b_1, b_2, …, b_n (1 ≤ b_i ≤ n).

If there are multiple answers, print any of them.

Examples

Input

3
0 0 0


Output

Possible
1 1 1 

Input

5
3 3 2 2 2


Output

Possible
1 1 2 2 2 

Input

4
0 1 2 3


Output

Impossible

Note

In the answer to the first example, all hats are the same, so every person will say that there were no persons wearing a hat different from kind 1.

In the answer to the second example, the first and the second person wore the hat with type 1 and all other wore a hat of type 2.

So the first two persons will say there were three persons with hats differing from their own. Similarly, three last persons will say there were two persons wearing a hat different from their own.

In the third example, it can be shown that no solution exists.

In the first and the second example, other possible configurations are possible.

Solution (in JAVA):

Solution:
// package cf.C1081;


import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.StringTokenizer;

/**
 * @author Sri Mouli
 * Copyright © 2018 Sri Mouli. All rights reserved.
 */

@SuppressWarnings("ALL")
public class B1081_NEW {

    public static long MOD = 1000000007;
    public static long[][][] dp;
    public static String INPUT = "3 " +
            "0 2 1";

    public static void main(String[] args) {
        long time = System.currentTimeMillis();
        boolean oj = System.getProperty("ONLINE_JUDGE") != null;
        PrintWriter out = new PrintWriter(System.out);
        FastReader in = new FastReader(oj);
        int n = in.nextInt();
        int [] a = in.nextIntArray(n);
        int [] b = new int[n] ;
        Arrays.fill(b,-1);
        Map<Integer,Integer> map = in.map;
        int cur = 1;
        Map<Integer,Integer> countsMap = new HashMap<>();
        for(Integer temp : map.keySet()){
            if(map.get(temp) % temp != 0){
                System.out.println("Impossible");
                return;
            }
            int k = map.get(temp)/(temp);
            fill(b,a,temp, k,cur);
            cur+=k;
        }
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<n;i++){
            sb.append(b[i]+" ");
        }
        System.out.println("Possible");
        System.out.println(sb.toString());

    }

    private static void fill(int[] b, int[] a, Integer temp, int k, int curIndex) {
        int cur = 0;
        for(int i=0;i<a.length;i++){
            if(a[i]==temp){
                if(cur==temp){
                    curIndex++;
                    cur%=temp;
                }
                b[i]=curIndex;
                cur++;
            }
        }
    }

    private static String getStr(int i, int cur) {
        StringBuilder sb = new StringBuilder();
        int a = cur;
        while(a-->0){
            sb.append(cur).append(" ");
        }
        cur++;
        return sb.toString();
    }

    static class Graph
    {
        int V;
        LinkedList<Integer> adjListArray[];

        // constructor
        Graph(int V)
        {
            this.V = V;

            // define the size of array as
            // number of vertices
            adjListArray = new LinkedList[V];

            // Create a new list for each vertex
            // such that adjacent nodes can be stored
            for(int i = 0; i < V ; i++){
                adjListArray[i] = new LinkedList<>();
            }
        }
    }

    // Adds an edge to an undirected graph
    static void addEdge(Graph graph, int src, int dest)
    {
        // Add an edge from src to dest.
        graph.adjListArray[src].add(dest);

        // Since graph is undirected, add an edge from dest
        // to src also
        graph.adjListArray[dest].add(src);
    }

    static void printGraph(Graph graph)
    {
        for(int v = 0; v < graph.V; v++)
        {
            System.out.println("Adjacency list of vertex "+ v);
            System.out.print("head");
            for(Integer pCrawl: graph.adjListArray[v]){
                System.out.print(" -> "+pCrawl);
            }
            System.out.println("\n");
        }
    }

    public static int upper_bound(int A[], int key) {
        int first = 0;
        int last = A.length;
        int mid;

        while (first < last) {
            mid = first + (last - first) / 2;

            if (A[mid] <= key)
                first = mid + 1;
            else
                last = mid;
        }
        return first;
    }

    // For finding greater than equal to
    public static int lower_bound(int A[], int key) {
        int first = 0;
        int last = A.length;
        int mid;
        while (first < last) {
            mid = first + ((last - first) >> 1);
            if (A[mid] < key)
                first = mid + 1;
            else
                last = mid;
        }

        return first;
    }

    @SuppressWarnings("rawtypes")
    public static void printPermutations(Comparable[] c) {
        System.out.println(Arrays.toString(c));
        while ((c = nextPermutation(c)) != null) {
            System.out.println(Arrays.toString(c));
        }
    }

    @SuppressWarnings({ "rawtypes", "unchecked" })
    // modifies c to next permutation or returns null if such permutation does not
    // exist
    public static Comparable[] nextPermutation(final Comparable[] c) {
        // 1. finds the largest k, that c[k] < c[k+1]
        int first = getFirst(c);
        if (first == -1)
            return null; // no greater permutation
        // 2. find last index toSwap, that c[k] < c[toSwap]
        int toSwap = c.length - 1;
        while (c[first].compareTo(c[toSwap]) >= 0)
            --toSwap;
        // 3. swap elements with indexes first and last
        swap(c, first++, toSwap);
        // 4. reverse sequence from k+1 to n (inclusive)
        toSwap = c.length - 1;
        while (first < toSwap)
            swap(c, first++, toSwap--);
        return c;
    }

    // finds the largest k, that c[k] < c[k+1]
    // if no such k exists (there is not greater permutation), return -1
    @SuppressWarnings({ "rawtypes", "unchecked" })
    public static int getFirst(final Comparable[] c) {
        for (int i = c.length - 2; i >= 0; --i)
            if (c[i].compareTo(c[i + 1]) < 0)
                return i;
        return -1;
    }

    // swaps two elements (with indexes i and j) in array
    @SuppressWarnings("rawtypes")
    public static void swap(final Comparable[] c, final int i, final int j) {
        final Comparable tmp = c[i];
        c[i] = c[j];
        c[j] = tmp;
    }

    public static long cal(int index, int last, int n, int left) {
        if (index == n) {
            return left == 0 ? 1 : 0;
        }
        if (left < 0) {
            return 0;
        }
        if (dp[last][index][left] != -1) {
            return dp[last][index][left];
        }
        long result = 0;
        for (int i = 0; i < 4; i++) {
            result += cal(index + 1, i, n, left - count(last, i));
            result %= MOD;

        }
        return dp[last][index][left] = result;
    }

    public static int count(int last, int cur) {
        if (last == cur) {
            return 0;
        }
        if (last == 0) {
            return 1;
        }
        if (last == 1) {
            if (cur == 2) {
                return 2;
            }
            return 0;
        }
        if (last == 2) {
            if (cur == 1) {
                return 2;
            }
            return 0;
        }
        return 1;
    }

    public static boolean div(int need, String v) {
        int cur = 0;
        for (int i = 0; i < v.length(); i++) {
            cur += v.charAt(i) - '0';
            if (cur == need) {
                cur = 0;
            } else if (cur > need) {
                return false;
            }
        }
        return true;
    }

    public static int[] KMP(String val) {
        int i = 0;
        int j = -1;
        int[] result = new int[val.length() + 1];
        result[0] = -1;
        while (i < val.length()) {
            while (j >= 0 && val.charAt(j) != val.charAt(i)) {
                j = result[j];
            }
            j++;
            i++;
            result[i] = j;
        }
        return result;

    }

    public static boolean nextPer(int[] data) {
        int i = data.length - 1;
        while (i > 0 && data[i] < data[i - 1]) {
            i--;
        }
        if (i == 0) {
            return false;
        }
        int j = data.length - 1;
        while (data[j] < data[i - 1]) {
            j--;
        }
        int temp = data[i - 1];
        data[i - 1] = data[j];
        data[j] = temp;
        Arrays.sort(data, i, data.length);
        return true;
    }

    public static class Point implements Comparable<Point> {

        int x, y;

        public Point(int start, int end) {
            this.x = start;
            this.y = end;
        }

        @Override
        public int hashCode() {
            int hash = 5;
            hash = 47 * hash + this.x;
            hash = 47 * hash + this.y;
            return hash;
        }

        @Override
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (getClass() != obj.getClass()) {
                return false;
            }
            final Point other = (Point) obj;
            if (this.x != other.x) {
                return false;
            }
            return this.y == other.y;
        }

        @Override
        public int compareTo(Point o) {
            return Integer.compare(x, o.x);
        }
    }

    public static long gcd(long a, long b) {
        if (b == 0) {
            return a;
        }
        return gcd(b, a % b);
    }

    public static long pow(long a, long b, long MOD) {
        if (b == 0) {
            return 1;
        }
        if (b == 1) {
            return a;
        }
        long val = pow(a, b / 2, MOD);
        if (b % 2 == 0) {
            return val * val % MOD;
        } else {
            return val * (val * a % MOD) % MOD;

        }
    }

    public static int digit(long n) {
        int result = 0;
        while (n > 0) {
            n /= 10;
            result++;
        }
        return result;
    }

    public static double dist(long a, long b, long x, long y) {
        double val = (b - a) * (b - a) + (x - y) * (x - y);
        val = Math.sqrt(val);
        double other = x * x + a * a;
        other = Math.sqrt(other);
        return val + other;

    }

    private static class Pair {
        long x;
        long y;

        @SuppressWarnings("unused")
        public Pair(long first, long second) {
            this.x = first;
            this.y = second;
        }

        @Override
        public String toString() {
            return "(" + x + "," + y + ")";
        }
    }

    @SuppressWarnings("rawtypes")
    public static Comparator csort = (Comparator<Pair>) (a, b) -> {
        if (a.x < b.x)
            return -1;
        else if (a.x > b.x)
            return 1;
        else
            return Long.compare(a.y, b.y);
    };

    static class FastReader {

        BufferedReader br;
        StringTokenizer st;
        InputStream is;
        byte[] inbuf = new byte[1024];
        int lenbuf = 0, ptrbuf = 0;

        FastReader(boolean onlineJudge) {
            is = onlineJudge ? System.in : new ByteArrayInputStream(INPUT.getBytes());
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        boolean isSpaceChar(int c) {
            return !(c >= 33 && c <= 126);
        }

        FastReader(String file) throws FileNotFoundException {
            br = new BufferedReader(new FileReader(file));
        }

        String next() {

            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (Exception e) {
                    throw new RuntimeException();
                }
            }
            return st.nextToken();
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        char nextChar() {
            return next().charAt(0);
        }

        String nextLine() {
            st = null;
            try {
                return br.readLine();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        boolean endLine() {
            try {
                String next = br.readLine();
                while (next != null && next.trim().isEmpty()) {
                    next = br.readLine();
                }
                if (next == null) {
                    return true;
                }
                st = new StringTokenizer(next);
                return st.hasMoreTokens();
            } catch (Exception e) {
                throw new RuntimeException();
            }
        }

        Map<Integer, Integer> map = new HashMap<>();
        int sum = 0;
        int[] nextIntArray(int n) {
            int[] a = new int[n];
            for (int i = 0; i < n; i++){
                int cur = n-nextInt();
                a[i]=cur;
                Integer temp = map.get(cur);
                if(temp!=null){
                    map.put(cur,++temp);
                } else {
                    map.put(cur,1);
                }
            }
            return a;
        }

        long[] nextLongArray(int n) {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = nextLong();
            return a;
        }

        int[][] next2DInt(int n, int m) {
            int[][] arr = new int[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextIntArray(m);
            }
            return arr;
        }

        long[][] next2DLong(int n, int m) {
            long[][] arr = new long[n][];
            for (int i = 0; i < n; i++) {
                arr[i] = nextLongArray(m);
            }
            return arr;
        }

        int[] shuffle(int[] arr) {
            Random r = new Random();
            for (int i = 1, j; i < arr.length; i++) {
                j = r.nextInt(i);
                arr[i] = arr[i] ^ arr[j];
                arr[j] = arr[i] ^ arr[j];
                arr[i] = arr[i] ^ arr[j];
            }
            return arr;
        }

        int[] uniq(int[] arr) {
            Arrays.sort(arr);
            int[] rv = new int[arr.length];
            int pos = 0;
            rv[pos++] = arr[0];
            for (int i = 1; i < arr.length; i++) {
                if (arr[i] != arr[i - 1]) {
                    rv[pos++] = arr[i];
                }
            }
            return Arrays.copyOf(rv, pos);
        }

    }

}