The Kadomtsev -- Petviashvili equation and relations for the periods of holomorphic differentials on Riemann surfaces