#include using namespace std; const int maxn = 55; int n,m; int p[maxn][maxn],ans[maxn],linker[maxn],used[maxn]; char s[maxn],t[maxn]; bool dfs(int u) { for (int v=1;v<=m;v++) if (p[u][v] && !used[v]) { used[v] = true; if (linker[v] == 0 || dfs(linker[v])) { linker[v] = u; return true; } } return false; } int main(void) { // freopen("b.in","r",stdin); int T; scanf("%d",&T); while (T--) { scanf("%d%d",&n,&m); for (int i=1;i<=m;i++) for (int j=1;j<=m;j++) p[i][j]=1; for (int i=0;i=1;i--) { memset(used,0,sizeof(used)); if (!dfs(i)) {ok=0; break;} } if (ok == 0) { printf("-1\n"); continue; } for (int i=1;i<=m;i++) ans[linker[i]] = i; for (int i=1;i<=m;i++) printf("%d%c",ans[i]," \n"[i==m]); } return 0; }