#include <bits/stdc++.h>
using namespace std;
pair<int, int> abcxyz[10000];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int x, tmp, tmp1, tmp2;
  cin >> x;
  tmp = x % 4;
  tmp1 = (x + 1) % 4;
  tmp2 = (x + 2) % 4;
  abcxyz[0].first = tmp, abcxyz[0].second = 0;
  abcxyz[1].first = tmp1, abcxyz[1].second = 1;
  abcxyz[2].first = tmp2, abcxyz[2].second = 2;
  sort(abcxyz, abcxyz + 3);
  for (int i = 0; i <= 2; i++) {
    if (abcxyz[i].first == 1) {
      cout << abcxyz[i].second << " A";
      return 0;
    }
  }
  if (abcxyz[2].first == 3) {
    cout << abcxyz[2].second << " B";
  } else if (abcxyz[2].first == 2) {
    cout << abcxyz[2].second << " C";
  } else if (abcxyz[2].first == 0) {
    cout << abcxyz[2].second << " D";
  }
}
