#include <bits/stdc++.h>
using namespace std;
int main() {
  string s[8];
  while (cin >> s[0]) {
    for (int i = 1; i < 8; ++i) {
      cin >> s[i];
    }
    int ans_w, ans_b;
    ans_w = ans_b = 8;
    for (int i = 0; i < 8; ++i) {
      int w = 0, b = 0;
      for (int j = 0; j < 8; ++j) {
        if (s[j][i] == 'W') {
          break;
        }
        if (s[j][i] == 'B') {
          w = 8;
          break;
        }
        ++w;
      }
      for (int j = 7; j >= 0; --j) {
        if (s[j][i] == 'B') {
          break;
        }
        if (s[j][i] == 'W') {
          b = 8;
          break;
        }
        ++b;
      }
      if (ans_w > w) ans_w = w;
      if (ans_b > b) ans_b = b;
    }
    cout << (ans_w <= ans_b ? 'A' : 'B') << endl;
  }
  return 0;
}
