  This paper builds on two covering Hopf algebras of the Hopf algebra QSym of
quasi-symmetric functions, with linear bases parameterized by compositions. One
is the Malvenuto-Reutenauer Hopf algebra SSym of permutations, mapped onto QSym
by taking descents of permutations. The other one is the recently introduced
Hopf algebra RQSym of weak quasi-symmetric functions, mapped onto QSym by
extracting compositions from weak compositions.
  We extend these two surjective Hopf algebra homomorphisms into a commutative
diagram by introducing a Hopf algebra HSym, linearly spanned by signed
permutations from the hyperoctahedral groups, equipped with the shifted
quasi-shuffle product and deconcatenation coproduct. Extracting a permutation
from a signed permutation defines a Hopf algebra surjection form HSym to SSym
and taking a suitable descent from a signed permutation defines a linear
surjection from HSym to RQSym. The notion of signed $P$-partitions from signed
permutations is introduced which, by taking generating functions, gives
fundamental weak quasi-symmetric functions and sends the shifted quasi-shuffle
product to the product of the corresponding generating functions. Together with
the existing Hopf algebra surjections from SSym and RQSym to QSym, we obtain a
commutative diagram of Hopf algebras revealing the close relationship among
compositions, weak compositions, permutations and signed permutations.
