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.DataInputStream;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Round659 {

	static int rec = 0;
	static int X[] = { -1, 0, 0, 1 };
	static int Y[] = { 0, -1, 1, 0 };
	static long mod = 1000000007;
	static int last=0;
	static int maxDepth=0;
	static class Reader {
		final private int BUFFER_SIZE = 1 << 16;
		private DataInputStream din;
		private byte[] buffer;
		private int bufferPointer, bytesRead;

		public Reader() {
			din = new DataInputStream(System.in);
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public Reader(String file_name) throws IOException {
			din = new DataInputStream(new FileInputStream(file_name));
			buffer = new byte[BUFFER_SIZE];
			bufferPointer = bytesRead = 0;
		}

		public String readLine() throws IOException {
			byte[] buf = new byte[64]; // line length
			int cnt = 0, c;
			while ((c = read()) != -1) {
				if (c == '\n')
					break;
				buf[cnt++] = (byte) c;
			}
			return new String(buf, 0, cnt);
		}

		public int nextInt() throws IOException {
			int ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (neg)
				return -ret;
			return ret;
		}

		public long nextLong() throws IOException {
			long ret = 0;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();
			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');
			if (neg)
				return -ret;
			return ret;
		}

		public double nextDouble() throws IOException {
			double ret = 0, div = 1;
			byte c = read();
			while (c <= ' ')
				c = read();
			boolean neg = (c == '-');
			if (neg)
				c = read();

			do {
				ret = ret * 10 + c - '0';
			} while ((c = read()) >= '0' && c <= '9');

			if (c == '.') {
				while ((c = read()) >= '0' && c <= '9') {
					ret += (c - '0') / (div *= 10);
				}
			}

			if (neg)
				return -ret;
			return ret;
		}

		private void fillBuffer() throws IOException {
			bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
			if (bytesRead == -1)
				buffer[0] = -1;
		}

		private byte read() throws IOException {
			if (bufferPointer == bytesRead)
				fillBuffer();
			return buffer[bufferPointer++];
		}

		public void close() throws IOException {
			if (din == null)
				return;
			din.close();
		}
	}

	public static long[] initArray(int n, Reader scan) throws IOException {

		long arr[] = new long[n];
		for (int i = 0; i < n; i++) {
			arr[i] = scan.nextLong();
		}

		return arr;
	}

	public static long sum(long arr[]) {

		long sum = 0;
		for (long i : arr) {
			sum += (long) i;
		}

		return sum;
	}

	public static long max(long arr[]) {

		long max = Long.MIN_VALUE;

		for (long i : arr) {
			max = Math.max(i, max);
		}

		return max;
	}

	public static long min(long arr[]) {
		long min = Long.MAX_VALUE;

		for (long i : arr) {
			min = Math.min(i, min);
		}

		return min;
	}

	public static List<Integer>[] initAdjacency(int n, int e, Reader scan, boolean type) throws IOException {

		List<Integer> adj[] = new ArrayList[n + 1];

		for (int i = 0; i < e; i++) {
			int u = scan.nextInt();
			int v = scan.nextInt();

			if (adj[u] == null)
				adj[u] = new ArrayList<>();
			if (type && adj[v] == null)
				adj[v] = new ArrayList<>();

			adj[u].add(v);

			if (type)
				adj[v].add(u);

		}

		return adj;
	}

	public static void main(String[] args) throws IOException {

		Reader scan = new Reader();
//		Scanner scan = new Scanner(System.in);

		int t = 1;
		while (t-- > 0) {
			
//			int n=scan.nextInt();
////			long arr[]=initArray(n, scan);
////			A(n, arr);
//			
//			int arr[]=new int[n];
//			for(int i=0;i<n;i++) {
//				arr[i]=scan.nextInt();
//			}
//			
//			B(n, arr);
			
			C(scan);
		}

	}
	
	
	public static void B(int n, int arr[]) {
		
		int max=Integer.MIN_VALUE;
		for(int val: arr) {
			max=Math.max(val,  max);
		}
		
		int count[]=new int[1001];
		
		for(long val: arr) {
			count[(int)val]++;
		}
		
		for(int i=0;i<n;i++) {
			
			int maxGCD= 0;
			int val=0;
			
			for(int j=1;j<=1000;j++) {
				
				if(count[j]==0) continue;
				
				int gcd= gcd(max, j);
				
				if(gcd>maxGCD) {
					maxGCD=gcd;
					val=j;
				}
				
			}
			
			System.out.print(val+" ");
			count[val]--;
			max=maxGCD;
			
		}
		
		System.out.println();
		
		
		
		
	}
	
	public static int gcd(int a, int b) {
		
		if(a>b) return gcd(b, a);
		
		if(a==0) return b;
		
		return gcd(b%a, a);
		
	}
	
	public static void C(Reader scan) throws IOException {
		
		int n=scan.nextInt();
		
		int pos=0;
		
		int arr[]=new int[n];
		
		int i=0;
		int j=1;
		
		while(i<n&&j<n) {
			
			System.out.println("? "+(i+1)+" "+(j+1));
			
			int val1= scan.nextInt();
			
			System.out.println("? "+(j+1)+" "+(i+1));
			
			int val2= scan.nextInt();
			
			int max=Math.max(val1, val2);
			
			if(val1==max) {
				arr[i]=max;
				
				i=j;
				j++;
				continue;
			}
			
			arr[j]=max;
			j++;
			
		}
		
		int sum=0;
		
		for(int k=0;k<n;k++) {
			sum+= arr[k];
		}
		
		int rem= (n*(n+1))/2- sum;
		
		if(i<n) {
			arr[i]=rem;
		}else {
			arr[j]=rem;
		}
		
		System.out.print("! ");
		
		for(int val: arr) {
			System.out.print(val+" ");
		}
	}
	
	public static void A(int n, long arr[]) {
		
		int c0=0;
		int c1=0;
		
		for(long val: arr) {
			
			if(val==0) c0++;
			else c1++;
			
		}
		
		if(c0>=n/2) {
			
			System.out.println(n/2);
			for(int i=0;i<n/2;i++) {
				System.out.print(0+" ");
			}
			
			System.out.println();
			return;
			
		}
		
		int val=n/2;
		
		if(val%2==0) {
			
			

			System.out.println(n/2);
			for(int i=0;i<n/2;i++) {
				System.out.print(1+" ");
			}
			
			System.out.println();
			return;
			
		}
		
		System.out.println(n/2+1);
		for(int i=0;i<n/2+1;i++) {
			System.out.print(1+" ");
		}
		
		
		System.out.println();
		
		
	}
	
	
	
	

}

class MyPair {

	int value;
	int weight;

	public MyPair(int value, int w) {
		this.value = value;
		weight = w;
	}

}