On a factorization of graded Hopf algebras using Lyndon words