import sys N=int(raw_input()) ans = [str(i+1) for i in range(N)] for i in range(N): q = '? ' for j in range(i%2, N-1, 2): q+=ans[j]+' '+ans[j+1]+' ' t=(len(q)-2)/4 for j in range(N-t): q+='0 0 ' print q[0:len(q)-1] r = raw_input().split() sys.stdout.flush() for j in range(t): if r[j]=='>': ans[j*2+i%2],ans[j*2+i%2+1]=ans[j*2+i%2+1],ans[j*2+i%2] res='! ' for a in ans: res+=a+' ' print res[0:len(res)-1]