#include<cstdio>
using namespace std;
int main()
{
	int a,b;
	scanf("%d %d",&a,&b);
	if(a ==1 && b != 1)	printf("A");
	if(b ==1 && a != 1)	printf("B");
	if(a > b)	printf("A");
	if(a < b)	printf("B");
	return 0;
}