#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int mod = n % 4;
  if (mod == 1) cout << 0 << " A" << endl;
  if (mod == 2) cout << 1 << " B" << endl;
  if (mod == 3) cout << 2 << " A" << endl;
  if (mod == 0) cout << 1 << " A" << endl;
  return 0;
}
