#include <bits/stdc++.h>
using namespace std;
const long long int inf = 9e18;
const long double pi = 2 * acos(0.0);
const int N = 1000005;
long long int tes, n, x;
vector<long long int> sieve(N, 0);
void si() {
  sieve[1] = 1;
  for (int i = 2; i < N; i++) {
    if (sieve[i] == 0) {
      for (int j = i; j < N; j += i) {
        sieve[j] = i;
      }
    }
  }
}
long long int power(long long int x, long long int y) {
  long long int res = 1ll;
  while (y > 0) {
    if (y & 1) res = res * x;
    y >>= 1;
    x = x * x;
  }
  return res;
}
void solve() {
  cin >> x;
  x %= 4;
  if (x == 1)
    cout << 0 << " "
         << "A"
         << "\n";
  else if (x == 3)
    cout << 2 << " "
         << "A"
         << "\n";
  else if (x == 2)
    cout << 1 << " "
         << "B"
         << "\n";
  else
    cout << 1 << " "
         << "A"
         << "\n";
}
int32_t main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  tes = 1;
  while (tes--) {
    solve();
  }
}
