Problem: This is an interactive problem.

We hid from you a permutation p of length n, consisting of the elements from 1 to n. You want to guess it. To do that, you can give us 2 different indices i and j, and we will reply with p_{i} mod p_{j} (remainder of division p_{i} by p_{j}).

We have enough patience to answer at most 2 ⋅ n queries, so you should fit in this constraint. Can you do it?

As a reminder, a permutation of length n is an array consisting of n distinct integers from 1 to n in arbitrary order. For example, [2,3,1,5,4] is a permutation, but [1,2,2] is not a permutation (2 appears twice in the array) and [1,3,4] is also not a permutation (n=3 but there is 4 in the array).

Input

The only line of the input contains a single integer n (1 ≤ n ≤ 10^4) — length of the permutation.

Interaction

The interaction starts with reading n. 

Then you are allowed to make at most 2 ⋅ n queries in the following way: 

  * "? x y" (1 ≤ x, y ≤ n, x ≠ y). 



After each one, you should read an integer k, that equals p_x mod p_y. 

When you have guessed the permutation, print a single line "! " (without quotes), followed by array p and quit.

After printing a query do not forget to output end of line and flush the output. Otherwise, you will get Idleness limit exceeded. To do this, use:

  * fflush(stdout) or cout.flush() in C++;
  * System.out.flush() in Java;
  * flush(output) in Pascal;
  * stdout.flush() in Python;
  * see documentation for other languages.



Exit immediately after receiving "-1" and you will see Wrong answer verdict. Otherwise you can get an arbitrary verdict because your solution will continue to read from a closed stream.

Hack format

In the first line output n (1 ≤ n ≤ 10^4). In the second line print the permutation of n integers p_1, p_2, …, p_n.

Example

Input


3

1

2

1

0

Output


? 1 2

? 3 2

? 1 3

? 2 1

! 1 3 2

Solution (in JAVA):

Solution:
import java.io.*;
import java.math.BigInteger;
import java.util.*;


public class Equal {
    static class pair implements Comparable<pair> {
        int v, w;

        public pair(int v, int w) {
            this.v = v;
            this.w = w;
        }

        @Override
        public int compareTo(pair o) {
            if (v == o.v)
                return w - o.w;
            return o.v - v;
        }
    }

    static class tri implements Comparable<tri> {
        int v, i, j;

        public tri(int v, int i, int j) {
            this.v = v;
            this.i = i;
            this.j = j;
        }

        @Override
        public int compareTo(tri o) {

            return v - o.v;
        }
    }

    static ArrayList<Integer>[] tree;
    static int timer = 0;
    static int[] timein;
    static int[] timeout;
    static int[][] powerParent;
    static int[] depth;
    static int[][] minWeight;

    static void dfs(int u, int parent) {

        timein[u] = ++timer;
//        powerParent[u][0] = parent;
////        minWeight[u][0] = weight;
//        if (parent == -1)
//            powerParent[u][0] = u;
//        for (int i = 1; i <= 32; i++) {
//            powerParent[u][i] = powerParent[powerParent[u][i - 1]][i - 1];
//            minWeight[u][i] = Math.min(minWeight[u][i - 1], minWeight[powerParent[u][i - 1]][i - 1]);
//        }
        for (int i = 0; i < tree[u].size(); i++) {
            int v = tree[u].get(i);
            if (v == parent)
                continue;
            depth[v] = depth[u] + 1;
            dfs(v, u);
        }


        timeout[u] = timer;
    }

    static boolean isAncestor(int u, int v) {
        return timein[u] <= timein[v] && timeout[v] <= timeout[u];
    }

    static int lca(int u, int v) {
        if (isAncestor(u, v))
            return u;
        if (isAncestor(v, u))
            return v;
        for (int i = 32; i >= 0; i--) {
            int temp = powerParent[u][i];
            if (!isAncestor(temp, v)) {
                u = temp;
            }
        }
        return powerParent[u][0];
    }

    static int distance(int u, int v) {
        return depth[u] + depth[v] - 2 * depth[lca(u, v)];
    }

    static int nthAncestor(int u, int n) {
        int c = -1;

        while (n > 0) {
            c++;
            if (n % 2 == 0) {
                n /= 2;
                continue;
            }
            u = powerParent[u][c];
            n /= 2;

        }
        return u;
    }

    static int nthMinWeight(int u, int n) {
        int c = -1;

        int min = (int) (1e9);
        while (n > 0) {
            c++;
            if (n % 2 == 0) {
                n /= 2;
                continue;
            }
            min = Math.min(min, minWeight[u][c]);
            u = powerParent[u][c];
            n /= 2;

        }
        return min;
    }


    static class SegmentTree {        // 1-based DS, OOP

        int N;            //the number of elements in the array as a power of 2 (i.e. after padding)
        int[] array, lazy;
        double[] sTree;

        public SegmentTree(int[] in) {
            array = in;
            N = in.length - 1;
            sTree = new double[N << 1];        //no. of nodes = 2*N - 1, we add one to cross out index zero
            lazy = new int[N << 1];
            build(1, 1, N);
        }

        public void build(int node, int b, int e)    // O(n)
        {
            if (b == e)
                sTree[node] = array[b];
            else {
                int mid = b + e >> 1;
                build(node << 1, b, mid);
                build(node << 1 | 1, mid + 1, e);
                sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
            }
        }


        public void update_point(int index, double oval, double nval)            // O(log n)
        {
            index += N - 1;
            sTree[index] -= oval;
            sTree[index] += nval;
            while (index > 1) {
                index >>= 1;
                sTree[index] = sTree[index << 1] + sTree[index << 1 | 1];
            }
        }


        public void update_range(int i, int j, double oval, double nval)        // O(log n)
        {
            update_range(1, 1, N, i, j, oval, nval);
        }

        public void update_range(int node, int b, int e, int i, int j, double oval, double nval) {
            if (i > e || j < b)
                return;
            if (b >= i && e <= j) {
                sTree[node] -= oval;
                sTree[node] += nval;

            } else {
                int mid = b + e >> 1;
//                propagate(node, b, mid, e);
                update_range(node << 1, b, mid, i, j, oval, nval);
                update_range(node << 1 | 1, mid + 1, e, i, j, oval, nval);
                sTree[node] = sTree[node << 1] + sTree[node << 1 | 1];
            }

        }

//        public void propagate(int node, int b, int mid, int e) {
//            lazy[node << 1] += lazy[node];
//            lazy[node << 1 | 1] += lazy[node];
//            sTree[node << 1] += (mid - b + 1) * lazy[node];
//            sTree[node << 1 | 1] += (e - mid) * lazy[node];
//            lazy[node] = 0;
//        }

        public double query(int i, int j) {
            return query(1, 1, N, i, j);
        }

        public double query(int node, int b, int e, int i, int j)    // O(log n)
        {
            if (i > e || j < b)
                return 0;
            if (b >= i && e <= j)
                return sTree[node];
            int mid = b + e >> 1;
//            propagate(node, b, mid, e);
            double q1 = query(node << 1, b, mid, i, j);
            double q2 = query(node << 1 | 1, mid + 1, e, i, j);
            return q1 + q2;

        }
    }

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

    public static void main(String[] args) throws IOException {
        //BufferedReader br = new BufferedReader(new FileReader("name.in"));
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st;
        PrintWriter out = new PrintWriter(System.out);
        int n = Integer.parseInt(br.readLine());
        int x = 1;
        int y = 2;
        int c = 3;
        int sum=(n*(n+1))/2;
        int sum2=0;
        int[] a = new int[n];
        if(n==1)
            a[0]=1;
        else {
            for (int i = 0; i < n; i++) {
                out.println("? " + x + " " + y);
                out.flush();
                int xx = Integer.parseInt(br.readLine());
                out.println("? " + y + " " + x);
                out.flush();
                int yy = Integer.parseInt(br.readLine());
                if (xx > yy) {
                    a[x - 1] = xx;
                    sum2 += xx;
                    x = c++;
                } else {
                    a[y - 1] = yy;
                    sum2 += yy;
                    y = c++;
                }
                if (x > n || y > n)
                    break;
            }
        }
        out.print("! ");
        out.flush();
        for (int i = 0; i <n ; i++) {
            if(a[i]==0)
                a[i]=sum-sum2;
            out.print(a[i]);
            if(i<n-1)
                out.print(" ");
        }
        out.flush();
        out.close();

    }


}