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 com.company;

import java.io.*;
import java.lang.reflect.Array;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Main {

    FastScanner in;
    PrintWriter out;
    int cnt;
    long mod = 1000000007;

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

    class Pair implements Comparable<Pair> {
        int x;
        int y;

        Pair(int i, int j) {
            x = i;
            y = j;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Pair p = (Pair) o;
            return (x == p.x && y == p.y);
        }

        @Override
        public int compareTo(Pair that) {
            if (x == that.x) {
                return Double.compare(y, that.y);
            }
            return Double.compare(x, that.x);
        }
    }




    class quemin {
        int[] stack1;
        int[] min1;
        int sz1;
        int stack2[];
        int min2[];
        int sz2;

        quemin(int n) {
            stack1 = new int[n];
            min1 = new int[n];
            stack2 = new int[n];
            min2 = new int[n];
            sz1 = sz2 = 0;
        }

        void add(int x) {
            stack1[sz1] = x;
            min1[sz1] = sz1 > 0 ? min(x, min1[sz1 - 1]) : x;
            sz1++;
        }

        void pop() {
            if (sz2 > 0) {
                sz2--;
            } else {
                while (sz1 > 0) {
                    stack2[sz2] = stack1[sz1 - 1];
                    min2[sz2] = sz2 > 0 ? min(stack2[sz2], min2[sz2 - 1]) : stack2[sz2];
                    sz2++;
                    sz1--;
                }
                sz2--;
            }
        }

        int getmin1() {
            if (sz1 > 0) {
                return min1[sz1 - 1];
            }
            return Integer.MAX_VALUE;
        }

        int getmin2() {
            if (sz2 > 0) {
                return min2[sz2 - 1];
            }
            return Integer.MAX_VALUE;
        }

        int getmin() {
            return min(getmin1(), getmin2());
        }
    }

    long sum(long a){
        long ans = 0;
        while(a > 0) {
            ans += a % 10;
            a/=10;
        }
        return ans;
    }

    ArrayList<Integer> g[];
    void dfs1(int v) throws IOException {
        used[v] = true;
        for(int i : g[v]){
            if(!used[i]){
                dfs1(i);
            }
        }
    }
    int[] minim;
    void dfs2(int v, int cnt) throws IOException{
        minim[v] = cnt;
        used[v] = true;
        for(int i : g[v]){
            if(!used[i]){
                dfs2(i, cnt + 1);
            }
        }
    }

    private void help() throws IOException {
        int n = in.nextInt();
        Pair[] a = new Pair[n];
        int[] ans = new int[n];
        for(int i = 0; i < n; i++){
            a[i] = new Pair(in.nextInt(), i);
        }
        Arrays.sort(a);
        int ind = 0;
        int cnt = 0;
        int req = 0;
        int c = 0;
        while(ind < n){
            c++;
            ans[a[ind].y] = c;
            req = n - a[ind].x;
            cnt = 0;
            while(ind < n && cnt < req && a[ind].x == n - req){;
                ans[a[ind].y] = c;
                cnt++;
                ind++;
            }
            if(cnt != req){
                out.print("Impossible");
                return;
            }
        }
        out.println("Possible");
        for(int i = 0; i < n; i++){
            out.print(ans[i] + " ");
        }

    }


    private void solve2() throws IOException {
        long a = in.nextLong(), b = in.nextInt();
        int ans = 0;
        if(b - a < 20){
            for(long i = a; i <= b; i++){
                if ((sum(i)) % 2 == 0) {
                    ans++;
                }
            }
        } else {
            long l = a % 10 == 0 ? a : a + (10 - a % 10);
            long r = b - b % 10;
            if (r >= l) {
                ans += 5 * ((r - l) / 10);
            }
            for (long i = a; i < l; i++) {
                if ((sum(i)) % 2 == 0) {
                    ans++;
                }
            }//3нч 4ч 5нч 6ч 7нч 8ч 9нч 10нч 11ч 12нч 13ч 14нч 15ч 16нч 17ч 18нч 19ч 20ч 21нч 22ч 23нч 24ч 25нч
            for (long i = r; i <= b; i++) {
                if ((sum(i)) % 2 == 0) {
                    ans++;
                }
            }
        }
        out.print(ans);

    }

    private void solveI() throws IOException {
        int x = in.nextInt(), y = in.nextInt(), z = in.nextInt();
        int sum = x + y + z;
        if(sum % 2 != 0){
            out.print("NO");
            return;
        }
        if(Math.max(Math.max(x, y), z) > sum/2){
            out.print("NO");
            return;
        }
        if(Math.min(Math.min(x, y), z) < sum/4){
            out.print("NO");
            return;
        }
        out.print("YES");
    }

    private void solveK() throws IOException{
        int k = in.nextInt();
        ArrayList<Integer> p = new ArrayList<>();
        int unprime[] = new int[2012];
        for(int i = 2; i < 2012; i++){
            if(unprime[i] == 0){
                p.add(i);
            }
            for(int j = 2; i * j < 2012; j++){
                unprime[i*j] = 1;
            }
        }
        int beg = 0, end = k - 1;
        long ans = 0;
        if(k > p.size()){
            out.print("NO SOLUTION");
            return;
        }
        for(int i = 0; i < min(k, p.size()); i++){
            ans += p.get(i);
        }
        while(end + 1 < p.size()){
            if(ans == 2011){
                for(int i = beg; i <= end; i++){
                    out.print(p.get(i) + " ");
                }
                return;
            }
            end++;
            beg++;
            ans -= p.get(beg - 1);
            ans += p.get(end);
        }
        if(ans == 2011){
            for(int i = beg; i <= end; i++){
                out.print(p.get(i) + " ");
            }
            return;
        }
        out.print("NO SOLUTION");
    }

    private void solveO() throws IOException {
        int n = in.nextInt();
        int[] ans1 = new int[n];
        int cur = 0;
        for(int i = 0; i < n; i++){
            ans1[i] = 400 - i;
            if(in.nextInt() == 1){
                cur = i;
                break;
            }
        }
        for(int i = 0; i  < n - cur - 1; i++){
            in.nextInt();
            ans1[n - i - 1] = i + 1;
        }
        int[] ans2 = new int[n];
        cur = 0;
        for(int i = 0; i < n; i++){
            ans2[i] = 400 - i;
            if(in.nextInt() == 1){
                cur = i;
                break;
            }
        }
        for(int i = 0; i < n - cur - 1; i++){
            ans2[n - i - 1] = i + 1;
        }
        for(int i = 0; i < n; i++){
            out.print(ans1[i] + " ");
        }
        out.println();
        for(int i = 0; i < n; i++){
            out.print(ans2[i] + " ");
        }

    }

    int[] from;
    int[] to;
    boolean[] used;


    private void solveL() throws IOException {
        int n = in.nextInt(), m = in.nextInt();
        int[][] tab = new int[n][m];
        boolean[][] used = new boolean[n][m];
        long[][] ans = new long[n][m];
        for(int i = 0; i < n; i++){
            for(int j = 0; j < m; j++){
                tab[i][j] = in.nextInt();
            }
        }
        ArrayDeque<Pair> bf = new ArrayDeque<>();
        bf.add(new Pair(0, 0));
        boolean f = false;
        while(!bf.isEmpty() &&!f){
            Pair cur = bf.poll();
            for(int i = cur.x + 1; i < n &&!f; i++){
                if(tab[i][cur.y] == 2){
                    out.print(ans[cur.x][cur.y] + 1);
                    f = true;
                    break;
                }
                if(i == n - 1 || tab[i + 1][cur.y] == 1){
                    if(!used[i][cur.y]){
                        ans[i][cur.y] = ans[cur.x][cur.y] + 1;
                        bf.add(new Pair(i, cur.y));
                    }
                    break;
                }
            }
            for(int i = cur.x - 1; i >= 0 && !f; i--){
                if(tab[i][cur.y] == 2){
                    out.print(ans[cur.x][cur.y] + 1);
                    f = true;
                    break;
                }
                if(i == 0 || tab[i - 1][cur.y] == 1){
                    if(!used[i][cur.y]){
                        ans[i][cur.y] = ans[cur.x][cur.y] + 1;
                        bf.add(new Pair(i, cur.y));
                    }
                    break;
                }
            }
            for(int j = cur.y + 1; j < n && !f; j++){
                if(tab[cur.x][j] == 2){
                    out.print(ans[cur.x][j] + 1);
                    f = true;
                    break;
                }
                if( j == n - 1 || tab[cur.x][j + 1] == 1){
                    if(!used[cur.x][j]){
                        ans[cur.x][j] = ans[cur.x][cur.y] + 1;
                        bf.add(new Pair(cur.x, j));
                    }
                    break;
                }
            }
            for(int j = cur.y - 1; j >= 0 && !f; j--){
                if(tab[cur.x][j] == 2){
                    out.print(ans[cur.x][j] + 1);
                    f = true;
                    break;
                }
                if( j == 0 || tab[cur.x][j - 1] == 1){
                    if(!used[cur.x][j]){
                        ans[cur.x][j] = ans[cur.x][cur.y] + 1;
                        bf.add(new Pair(cur.x, j));
                    }
                    break;
                }
            }
            used[cur.x][cur.y] = true;
        }

    }



    class FastScanner {
        StringTokenizer st;
        BufferedReader br;

        FastScanner(InputStream s){
            br = new BufferedReader(new InputStreamReader(s));
        }

        String next() throws IOException {
            while(st == null || !st.hasMoreTokens()){
                st = new StringTokenizer(br.readLine());
            }
            return st.nextToken();
        }
        boolean hasNext() throws IOException {
            return br.ready() || (st != null && st.hasMoreTokens());
        }

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

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

        double nextDouble() throws IOException {
            return Double.parseDouble(next().replace(',', '.'));
        }

        boolean hasNextLine() throws IOException {
            return br.ready();
        }

        String nextLine() throws IOException {
            return br.readLine();
        }

    }
    //157нч 158ч 159нч 160нч 161ч 162нч 163ч 164нч 165ч 166нч 167ч 168нч 169ч 170ч 171нч 172ч 173нч 174ч 175нч 176ч 177нч 178ч 179нч 180нч 181ч 182нч
    private void run() throws IOException {
        in = new FastScanner(System.in); //new FileInputStream(".in");
        out = new PrintWriter(System.out);
        help();
        /*for(int i = 0; i < 15; i++) {
            solve2();
            out.println();
            out.println();
        }*/
        out.flush();
        out.close();
    }






    public static void main(String[] args) throws IOException {
        new Main().run();

    }

}