UPDATE: resolved. I did in fact mess up the N=3. For some reason I through that queries AAB would be enough but you do need at least four like in the editorial (BAAB).
https://codeforces.me/contest/1746/submission/176813280
because it's interactive there's absolutely no feedback on what's wrong in practice mode. I'm pretty sure I exhaustively checked all N=3 cases.