UPDATE: resolved. I did in fact mess up the N=3. For some reason I thought 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.
I think it would be great for problemsetters to provide a sample interactor (also known as a "testing tool" on some contests such as GCJ) on interactive problems.