#include <bits/stdc++.h>
using namespace std;
char a[9][9];
int i, j, ok, maxA = 10, maxB = 10, i2;
int main() {
  for (i = 1; i <= 8; i++)
    for (j = 1; j <= 8; j++) cin >> a[i][j];
  for (i = 1; i <= 8; i++)
    for (j = 1; j <= 8; j++) {
      if (a[i][j] == 'W')
        if (i - 1 < maxA) {
          ok = 0;
          for (i2 = i - 1; i2 >= 1; i2--)
            if (a[i2][j] == 'B') {
              ok = 1;
              break;
            }
          if (ok == 0) maxA = i - 1;
        }
      if (a[i][j] == 'B')
        if (8 - i < maxB) {
          ok = 0;
          for (i2 = i + 1; i2 <= 8; i2++)
            if (a[i2][j] == 'W') {
              ok = 1;
              break;
            }
          if (ok == 0) maxB = 8 - i;
        }
    }
  if (maxA <= maxB)
    cout << "A";
  else
    cout << "B";
  return 0;
}
