Exact stationary solution of the master equation for systems far from thermal equilibrium in detailed balance