#!/usr/bin/env python3 import sys QUERY_LIMIT = 2000 n = int(input()) a = list(range(1,n+1)) for i in range(QUERY_LIMIT): q = [] j = i % 2 while j+1 < n: q.append(a[j]) q.append(a[j+1]) j += 2 print('?', *q) q = input().split() j = i % 2 while j+1 < n: if q[j//2] == '>': a[j], a[j+1] = a[j+1], a[j] j += 2 print('!', *a)