Maximum principle for functional equations in the space of discontinuous functions of three variables