#include <bits/stdc++.h>
using namespace std;
char mp[9][9];
int main() {
  while (scanf("%s", mp[0]) != EOF) {
    int lastb = 0, lastw = 7;
    for (int i = 1; i < 8; i++) {
      scanf("%s", mp[i]);
    }
    for (int i = 0; i < 8; i++) {
      for (int j = 0; j < 8; j++) {
        if (mp[i][j] == 'B') {
          int flag = 1;
          for (int k = i + 1; k < 8; k++) {
            if (mp[k][j] == 'W') {
              flag = 0;
              break;
            }
          }
          if (flag) {
            lastb = max(lastb, i);
          }
        } else if (mp[i][j] == 'W') {
          int flag = 1;
          for (int k = i - 1; k >= 0; k--) {
            if (mp[k][j] == 'B') {
              flag = 0;
              break;
            }
          }
          if (flag) {
            lastw = min(lastw, i);
          }
        }
      }
    }
    if (lastw - 0 > 7 - lastb) {
      printf("B\n");
    } else {
      printf("A\n");
    }
  }
  return 0;
}
