#include <bits/stdc++.h>
using namespace std;
const string __sep = "\n";
bool checkpal(string& s) {
  int n = s.length();
  for (int i = 0; i < n / 2 + 1; ++i) {
    if (s[i] != s[n - 1 - i]) return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int T = 1;
  while (T-- > 0) {
    int x;
    cin >> x;
    int mo = x % 4;
    if (mo == 0) {
      cout << (1) << " A" << endl;
      ;
    } else if (mo == 1) {
      cout << (0) << " A" << endl;
      ;
    } else if (mo == 2) {
      cout << (1) << " B" << endl;
      ;
    } else {
      cout << (2) << " A" << endl;
      ;
    }
  }
  return 0;
}
