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

import java.io.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeMap;
import java.util.TreeSet;




public class Main {

  public static PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out));

  static class FastReader {

    BufferedReader br;
    StringTokenizer st;

    public FastReader() {
      br = new BufferedReader(new
          InputStreamReader(System.in));
    }

    String next() {
      while (st == null || !st.hasMoreElements()) {
        try {
          st = new StringTokenizer(br.readLine());
        } catch (IOException e) {
          e.printStackTrace();
        }
      }
      return st.nextToken();
    }

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

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

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

    String[] nextSArray() {
      String sr[] = null;
      try {
        sr = br.readLine().trim().split(" ");
      } catch (IOException e) {
        e.printStackTrace();
      }
      return sr;
    }

    String nextLine() {
      String str = "";
      try {
        str = br.readLine();
      } catch (IOException e) {
        e.printStackTrace();
      }

      return str;
    }
  }

//  static long mod = 1000000007;
//
//  static ArrayList<String> al=new ArrayList<>();
//  public static int n;
//
//  static  long inversion=0;
//
//  // static long arr[];
//static long tree[] = new long[100000];
//static void MakeTree(long arr[],int s,int e,int i)
//{
//  if(s==e)
//  {
//    tree[i] = arr[s];
//    return;
//  }
//  if(s<e)
//  {
//    int mid = (s+e)/2;
//    MakeTree(arr,s,mid,2*i);
//    MakeTree(arr,mid+1,e,2*i+1);
//    tree[i] = Math.min(tree[2*i],tree[2*i+1]);
//  }
//  return;
//}

//static long MinQuery(int s,int e,int qs,int qe,int i)
//{
//  long t=0;
//
//  if(qe<s || qs>e)
//  { t= Long.MAX_VALUE;}
//  else if(s==e)
//  {
//    t = tree[i];
//  }
//  else if(qs==s&&qe==e)
//  {
//    t = tree[i];
//
//  }
//  else {
//    int mid = (s + e) / 2;
//    t= Math.min(MinQuery(s, mid, qs, qe, 2 * i), MinQuery(mid + 1, e, qs, qe, 2 * i + 1));
//
//  }
//
//  return t;
//}
//
//public static void  UpdateQuery(int s,int e,int i,int qi,long val)
//{
//  if(qi<s||qi>e)
//    return;
//  if(s==e)
//  {
//    if(s==qi)
//      tree[i]=val;
//    return;
//  }
//  int mid = (s+e)/2;
//  UpdateQuery(s,mid,2*i,qi,val);
//  UpdateQuery(mid+1,e,2*i+1,qi,val);
//
//
//
//}

//public static int QueryTime(int s,int e,int qs,int qe,long k,int i)
//{
//
//  if(qe<s || qs>e)
//  {
//
//    return 0;}
//  if(s>=qs && e<=qe)
//  {
//    int index = Collections.binarySearch(tree[i].al , k);
//    if(index<0)
//      index = Math.abs(index)-1;
//    //System.out.println(tree[i].al.size()-index);
//    return tree[i].al.size()-index;
//  }
//  int mid = (s+e)/2;
//  int m1 = QueryTime(s,mid,qs,qe,k,2*i);
//  int m2 = QueryTime(mid+1,e,qs,qe,k,2*i+1);
//
// // System.out.println((m1+m2) +" "+m1+" "+m2);
//  return m1+m2;
//}
//  public static ArrayList<Long> MakeTree(int s,int e,long arr[],int i)
//  {
//    if(s==e)
//    {
//      ArrayList<Long>al=new ArrayList<>();
//      al.add(arr[s]);
//      Node n = new Node(al);
//      tree[i]=n;
//      return al;
//    }
//    int mid = (s+e)/2;
//    ArrayList<Long> al1=MakeTree(s,mid,arr,2*i);
//    ArrayList<Long> al2=MakeTree(mid+1,e,arr,2*i+1);
//    ArrayList<Long>al=new ArrayList<>();
////    System.out.println("al1" +al1.toString());
////    System.out.println("al2" +al2.toString());
//
//    int ai=0,bi=0;
//    while(ai<al1.size() && bi<al2.size())
//    {
//      if(al1.get(ai)<al2.get(bi))
//      {
//        al.add(al1.get(ai));
//        ++ai;
//      }
//      else
//      {
//        al.add(al2.get(bi));
//        ++bi;
//      }
//    }
//    while(ai<al1.size())
//    {
//      al.add(al1.get(ai++));
//    }
//    while(bi<al2.size())
//    {
//      al.add(al2.get(bi++));
//    }
////    System.out.println("al"+al.toString());
//
//    Node n=new Node(al);
//    tree[i]=n;
//    return al;
//  }
//
//
//  static  int arr[][];
//  static Node tree[]=new Node[400070];


  public static void main(String[] args) throws Exception {
    FastReader sc = new FastReader();
//    int t=sc.nextInt();
//    for(int t1=0;t1<t;++t1) {
      int n=sc.nextInt();
      boolean used[]=new boolean[n];
      int unusedindex=0;
      if(n==1)
      {
        System.out.println("! 1");
      }
      int arr[]=new int[n];
      for(int i=0;i<n;++i)
      {
        int j=i+1;
        while(j<n && !used[i])
        {
          System.out.println("? "+(i+1)+" "+(j+1));
          int k1 = sc.nextInt();
          System.out.println("? "+(j+1)+" "+(i+1));
          int k2 = sc.nextInt();

          if(k1>k2)
          {
            used[i]=true;
            arr[i]=k1;

          }
          else
          {
            used[j]=true;
            arr[j]=k2;

          }


          ++j;
        }
        if(j>=n && !used[i])
        {
          used[i]=true;
          arr[i]=n;
        }



      }

    System.out.println("! "+Arrays.toString(arr).replaceAll("[\\[|\\]|,]",""));




  }



}







// out.println(al.toString().replaceAll("[\\[|\\]|,]",""));