with Ada.Text_IO; use Ada.Text_IO;
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;

procedure Solve is
   N : Integer;
begin
   Get (N);
   if N < 1000 then
      Put_Line ("ABC");
   else
      Put_Line ("ABD");
   end if;
end Solve;