import std.stdio; import std.string; import std.conv; import std.algorithm; void answer(int[] ans){ writefln("! %s", ans.to!(string[]).join(" ")); stdout.flush; } int query(int[] ans){ writefln("? %s", ans.to!(string[]).join(" ")); stdout.flush; return readln.chomp.to!int; } void main(){ int n = readln.chomp.to!int; int[] fixed; int min = 0; int max = n - 1; int[] cand; for(auto i = 1; i <= n; i++){ cand ~= i; } while(fixed.length < n - 1){ int c = (min + max + 1) / 2; auto r = query(fixed ~ cand[c] ~ cand[0 .. c] ~ cand[ c + 1 .. $]); final switch(r){ case 1: min = c; break; case 0: max = c - 1; break; case -1: return; } if(min == max){ fixed ~= cand[min]; cand = cand.remove(min); min = 0; max = cast(int)cand.length - 1; } } answer(fixed ~ cand); }