Measurement of the B ---> D-bar(*)D(*)K branching fractions