import java.util.*;
import java.io.*;


public class parade_ab_wa {
    public static void main(String[] arg) {
        new parade_ab_wa().run();
    }

    StrictScanner in;
    PrintWriter out;

    public void run() {
        try {
            String problemName = this.getClass().getName().split("_")[0];
            in = new StrictScanner(new FileReader(problemName + ".in"));
            out = new PrintWriter(problemName + ".out");
            solve();
        } catch (Throwable e) {
            e.printStackTrace();
            System.exit(-1);
        } finally {
            out.close();
        }
    }

    final int MAXN = 100000;
    final int MAXA = (int)1e9;

    final String IMPOSSIBLE = "Impossible";
    
    void solve() throws Exception {
        int n = assertBetween(1, in.loadLine().nextInt(), MAXN, "n");
        int[] a = new int[n];
        for (int i = 0; i < n; ++i) {
            a[i] = assertBetween(1, (i == 0 ? in.loadLine() : in.skipSpace()).nextInt(), MAXA, "a_{" + (i + 1) + "}");
        }
        if (n == 1) {
        	out.println(IMPOSSIBLE);
        	return;
        }
        
        Tree tr = new Tree(a);
        boolean[] up = new boolean[n];
        int l = 0;
        int r = a.length - 1;
        while (l <= r) {
        	int k = tr.get(l, r);
        	if (k == r) {
        		--r;
        	} else {
        		up[k] = true;
        		l = k + 1;
        	}
        }
        int p1 = -1;
        int p2 = -1;
        int ans_cnt = 0;
        for (int i = 0; i < n; ++i) {
        	if (up[i]) {
        		if (p1 >= 0 && a[p1] <= a[i]) {
        			out.println(IMPOSSIBLE);
        			return;
        		}
        		p1 = i;
        	} else {
        		++ans_cnt;
        		if (p2 >= 0 && a[p2] >= a[i]) {
        			out.println(IMPOSSIBLE);
        			return;
        		}
        		p2 = i;
        	}
        }
        
        if (ans_cnt == 0) {
        	ans_cnt = 1;
        	up[0] = false;
        }
        if (ans_cnt == n) {
        	ans_cnt = n - 1;
        	up[0] = true;
        }
        
        
        out.println(ans_cnt);
        for (int i = 0; i < n; ++i) {
        	if (!up[i]) {
        		out.print(i + 1);
        		out.print(" ");
        	}
        }
        out.println();        
    }

    class Tree {
        int[] x;
        int[] a;
        int m;

        public Tree(int[] a) {
        	this.a = a;
            m = 1;
            while (m < a.length) m <<= 1;
            x = new int[2 * m];
            
            for (int i = 0; i < a.length; ++i) {
            	x[i + m] = i;
            }
            for (int i = a.length; i < m; ++i) {
            	x[i + m] = a.length - 1;
            }
            for (int i = m - 1; i > 0; --i) {
            	int j = 2 * i;
            	if (a[x[j]] < a[x[j + 1]]) ++j;
            	x[i] = x[j];            	
            }            
        }
        
        int get(int l, int r) {
        	int ans = l;
        	l += m;
        	r += m;
        	while (l <= r) {
        		if (a[ans] < a[x[l]] || a[ans] == a[x[l]] && ans > x[l]) {
    				ans = x[l];
    			}
        		if (a[ans] < a[x[r]] || a[ans] == a[x[r]] && ans > x[r]) {
        			ans = x[r];
        		}
        		l = (l + 1) / 2;
        		r = (r - 1) / 2;
        	}
        	return ans;
        }
    }

    int assertBetween(int l, int m, int r, String name) {
        assert l <= m && m <= r : "Variable " + name + " = " + m + " not in bounds [" + l + ", " + r + "]";
        return m;
    }

    class StrictScanner extends BufferedReader {

        private String cs;
        private int cpos;

        public StrictScanner(Reader a) {
            super(a);
        }

        boolean eoln() {
            return cpos == cs.length();
        }

        StrictScanner loadLine() throws IOException {
            assert cs == null || eoln();
            cs = readLine();
            cpos = 0;
            return this;
        }

        char nextChar() {
            return cs.charAt(cpos++);
        }

        String nextToken() {
            StringBuilder sb = new StringBuilder();
            while (cpos < cs.length() && cs.charAt(cpos) != ' ') {
                sb.append(cs.charAt(cpos));
                ++cpos;
            }
            return sb.toString();
        }

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

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

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

        StrictScanner skipSpace() {
            char c = nextChar();
            assert c == ' ';
            return this;
        }
    }
}
