improved generation of results to save A, B, C and solution in codility format