p6 solution