using System;
using System.Collections.Generic;
using Debug = System.Diagnostics.Debug;
using StringBuilder = System.Text.StringBuilder;
using System.Numerics;
using static System.Linq.Enumerable;
using static System.Math;
namespace Program
{
public class Solver
{
///
///parallel tree selection sort
///
public void Solve()
{
var n = int.Parse(Console.ReadLine());
var pos = new int[n + 1];
var m = 1;
while (m < n) m <<= 1;
var a = new int?[m << 1];
for (int i = 0; i < n; i++)
{
a[i + m] = i + 1;
pos[i + 1] = i + m;
}
var ans = new List();
while (ans.Count < n)
{
var q = new int[2 * n];
var p = 0;
for (int i = 1; i < m; i++)
{
if (a[i] != null)
{
if (i == 1)
{
ans.Add(a[i].Value);
pos[a[i].Value] = -1;
a[i] = null;
}
continue;
}
var l = i * 2;
var r = i * 2 + 1;
if (a[l] == null && a[r] == null)
continue;
else if (a[r] == null) { a[i] = a[l]; a[l] = null; pos[a[i].Value] = i; }
else if (a[l] == null) { a[i] = a[r]; a[r] = null; pos[a[i].Value] = i; }
else { q[p++] = a[l].Value; q[p++] = a[r].Value; }
}
if (p == 0) continue;
Console.WriteLine("? {0}", q.AsJoinedString());
var res = Console.ReadLine().Split();
for (int i = 0; i < p; i += 2)
{
if (res[i / 2] == "<")
{
var l = pos[q[i]];
a[l / 2] = a[l];
pos[q[i]] /= 2;
a[l] = null;
}
else
{
var r = pos[q[i + 1]];
a[r / 2] = a[r];
pos[q[i + 1]] /= 2;
a[r] = null;
}
}
//Debug.WriteLine(a.Select(x => x ?? -1).AsJoinedString());
}
Console.WriteLine("! {0}", ans.AsJoinedString());
}
static T[] Enumerate(int n, Func f) { var a = new T[n]; for (int i = 0; i < n; ++i) a[i] = f(i); return a; }
static public void Swap(ref T a, ref T b) { var tmp = a; a = b; b = tmp; }
}
}
#region main
static class Ex
{
static public string AsString(this IEnumerable ie) { return new string(System.Linq.Enumerable.ToArray(ie)); }
static public string AsJoinedString(this IEnumerable ie, string st = " ") { return string.Join(st, ie); }
static public void Main()
{
var solver = new Program.Solver();
solver.Solve();
}
}
#endregion