Competition between stripe and checkerboard magnetic instabilities in Mn-doped BaFe2As2