#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, f1 = 0, min1, min2;
  string str;
  int dp[8][8];
  for (i = 0; i < 8; i++) {
    cin >> str;
    for (j = 0; j < str.size(); j++) {
      if (str[j] == '.')
        dp[i][j] = -1;
      else {
        if (str[j] == 'W') {
          dp[i][j] = 1;
        }
        if (str[j] == 'B') {
          dp[i][j] = 2;
        }
      }
    }
  }
  min1 = -1;
  int k, flag;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (dp[i][j] == 1) {
        k = i - 1;
        flag = 0;
        while (k >= 0) {
          if (dp[k][j] == 2) {
            flag = 1;
            break;
          }
          k--;
        }
        if (flag != 1) {
          min1 = i;
          break;
        }
      }
    }
    if (min1 != -1) {
      break;
    }
  }
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      if (dp[i][j] == 2) {
        k = i + 1;
        flag = 0;
        while (k <= 7) {
          if (dp[k][j] == 1) {
            flag = 1;
            break;
          }
          k++;
        }
        if (flag != 1) {
          min2 = i;
        }
      }
    }
  }
  if (min1 <= 7 - min2) {
    cout << "A";
  } else {
    cout << "B";
  }
  return 0;
}
