using System;
using System.Linq;
using System.Diagnostics;
using System.Collections.Generic;
using Debug = System.Diagnostics.Debug;
using StringBuilder = System.Text.StringBuilder;
using System.Numerics;
namespace Program
{
public class Solver
{
///
/// 分割統治
///
public void Solve()
{
var n = int.Parse(Console.ReadLine());
var m = 1;
while (m < n) m <<= 1;
var a = new int[m];
for (int i = 0; i < n; i++)
a[i] = i + 1;
var cnt = new int[n];
for (int size = 1; size < m; size <<= 1)
{
for (int shift = 0; shift < size; shift++)
{
var q = new int[2 * n];
var p = 0;
for (int k = 0; k < n; k += size * 2)
{
for (int i = 0; i < size; i++)
{
var from = k + i;
var to = k + size + ((i + shift) % size);
q[p++] = a[from];
q[p++] = a[to];
}
}
Console.WriteLine("? {0}", q.AsJoinedString());
var res = Console.ReadLine().Split();
for (int i = 0; i < n; i++)
{
var l = i * 2;
var r = i * 2 + 1;
if (q[l] == 0 || q[r] == 0) continue;
if (res[i] == ">") cnt[q[l] - 1]++;
else if (res[i] == "<") cnt[q[r] - 1]++;
}
}
}
var ans = new int[n];
for (int i = 0; i < n; i++)
ans[cnt[i]] = i + 1;
Console.WriteLine("! {0}", ans.AsJoinedString());
}
public IO.StreamScanner sc = new IO.StreamScanner(Console.OpenStandardInput());
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();
Program.IO.Printer.Out.Flush();
}
}
#endregion
#region Ex
namespace Program.IO
{
using System.IO;
using System.Text;
using System.Globalization;
public class Printer : StreamWriter
{
static Printer() { Out = new Printer(Console.OpenStandardOutput()) { AutoFlush = false }; }
public static Printer Out { get; set; }
public override IFormatProvider FormatProvider { get { return CultureInfo.InvariantCulture; } }
public Printer(System.IO.Stream stream) : base(stream, new UTF8Encoding(false, true)) { }
public Printer(System.IO.Stream stream, Encoding encoding) : base(stream, encoding) { }
public void Write(string format, T[] source) { base.Write(format, source.OfType