#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(6);
  cout << fixed;
  int n;
  cin >> n;
  int m = n % 4;
  if (m == 1) cout << "0 A";
  if (m == 2) cout << "1 B";
  if (m == 3) cout << "2 A";
  if (m == 0) cout << "1 A";
  return 0;
}
