var
a, b, c, k : integer;
begin
read (a, b, c, k);
if (a mod k <> 0) and (b mod k <> 0) and (c mod k <> 0) then writeln ('Никаких')
else begin
if a mod k = 0 then writeln ('a');
if b mod k = 0 then writeln ('b');
if c mod k = 0 then writeln ('c');
end;
end.