The profinite completion of accessible groups
We introduce a class $\A$ of finitely generated residually finite accessible groups with some natural restriction on one-ended vertex groups in their JSJ-decompositions. We prove that the profinite completion of groups in $\A$ almost detects its JSJ-decomposition and compute the genus of free products of groups in $\A$.