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 CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize "trapv"
using namespace std;
void huehue(istream_iterator<string> it) {}
template <typename T, typename... Args>
void huehue(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << ", ";
  huehue(++it, args...);
}
template <class T>
T inf() {
  return numeric_limits<T>::max();
}
void read() { return; }
void print() { return; }
void println() {
  cout << "\n";
  return;
}
template <class T>
T read(T &x) {
  cin >> x;
  return x;
}
template <class T>
void print(T a) {
  cout << a;
}
template <class T>
void println(T a) {
  cout << a << "\n";
}
template <class T>
void read(vector<T> &arr) {
  for (auto &i : arr) cin >> (i);
}
template <class T>
void print(vector<T> arr) {
  for (auto &i : arr) {
    cout << i << " ";
  }
}
template <class T>
void println(vector<T> arr) {
  for (auto &i : arr) {
    cout << i << " ";
  }
  cout << "\n";
}
template <class T>
void read(vector<vector<T>> &arr) {
  for (auto &i : arr) read(i);
}
template <class T>
void print(vector<vector<T>> arr) {
  for (auto &i : arr) println(i);
}
template <class T>
void println(vector<vector<T>> arr) {
  for (auto &i : arr) println(i);
}
template <typename T, typename... Args>
void read(vector<T> &arr, Args &...args) {
  read(arr);
  read(args...);
}
template <typename T, typename... Args>
void read(vector<vector<T>> &arr, Args &...args) {
  read(arr);
  read(args...);
}
template <typename T, typename... Args>
void read(T &a, Args &...args) {
  cin >> (a);
  read(args...);
}
template <typename T, typename... Args>
void print(vector<T> &arr, Args &...args) {
  print(arr);
  print(args...);
}
template <typename T, typename... Args>
void print(T a, Args... args) {
  cout << a << " ";
  print(args...);
};
template <typename T, typename... Args>
void println(vector<T> &arr, Args &...args) {
  print(arr);
  println(args...);
}
template <typename T, typename... Args>
void println(T a, Args... args) {
  cout << a << " ";
  println(args...);
};
const long long int d4i[4] = {-1, 0, 1, 0}, d4j[4] = {0, 1, 0, -1};
const long long int d8i[8] = {-1, -1, 0, 1, 1, 1, 0, -1},
                    d8j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
void solveEachTest(long long int _TestCase) {
  long long int n;
  read(n);
  vector<long long int> arr(n + 1);
  set<long long int> indices;
  for (long long int i = 0ll; i < n; (i) += 1ll) {
    indices.insert(i + 1);
  }
  for (long long int qq = 0ll; qq < n; (qq) += 1ll) {
    long long int firstOne = -1, secondOne = -1;
    if (((int)((indices).size())) == 1) {
      break;
    }
    for (auto &jj : indices) {
      if (firstOne == -1) {
        firstOne = jj;
        continue;
      } else if (secondOne == -1) {
        secondOne = jj;
        break;
      } else {
        break;
      }
    }
    long long int query1Ans, query2Ans;
    println("?", firstOne, secondOne);
    read(query1Ans);
    println("?", secondOne, firstOne);
    read(query2Ans);
    if (query1Ans > query2Ans) {
      arr[firstOne] = query1Ans;
      indices.erase(firstOne);
    } else {
      arr[secondOne] = query2Ans;
      indices.erase(secondOne);
    }
  }
  set<long long int> tempSet;
  for (long long int i = 0ll; i < n; (i) += 1ll) {
    tempSet.insert(i + 1);
  }
  for (auto i = (1); (((1) > 0) ? (i) < (n + 1) : (i) > (n + 1)); (i) += (1)) {
    if (arr[i] != 0) tempSet.erase(arr[i]);
  }
  long long int temp = 0;
  if (((int)((tempSet).size())) > 0) {
    temp = (*tempSet.begin());
  }
  cout << "! ";
  for (auto i = (1ll); (((1ll) > 0) ? (i) < (n + 1ll) : (i) > (n + 1ll));
       (i) += (1ll)) {
    if (arr[i] == 0) {
      arr[i] = temp;
    }
    cout << arr[i] << " ";
  }
  cout << "\n";
  return;
}
signed main() {
  long long int T3X0 = 0, T353 = 1;
  solveEachTest(T353 - T3X0);
  return 0;
}