{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"有一堆石子共有 $N$ 个。 $A\\ B$ 两个人轮流拿, $A$ 先拿。每次最少拿 $1$ 颗,最多拿 $K$ 颗,拿到最后 $1$ 颗石子的人获胜。假设 $A\\ B$ 都非常聪明,拿石子的过程中不会出现失误。给出 $N$ 和 $K$ ,问最后谁能赢得比赛。\r\n例如 $N \u003d 3$ , $K \u003d 2$ 。无论 $A$ 如何拿, $B$ 都可以拿到最后 $1$ 颗石子。"}},{"title":"Input","value":{"format":"MD","content":"第 $1$ 行:一个数 $T$ ,表示后面用作输入测试的数的数量。( $1 \\le T \\le 10000)$\r\n第 $2 - T + 1$ 行:每行 $2$ 个数 $N$ , $K$ 。中间用空格分隔。( $1 \\le N,K \\le 10^9)$"}},{"title":"Output","value":{"format":"MD","content":"共 $T$ 行,如果 $A$ 获胜输出 $A$ ,如果 $B$ 获胜输出 $B$ 。"}},{"title":"Sample 1","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\n3 2\n4 2\n7 3\n8 3\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eB\nA\nA\nB\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}