TASK DEFINITION: In this task, you are given an input list. A list contains several comma-separated items written within brackets. You need to collate all the alphabetical elements at the start of the list followed by all the numerical elements of the list. Maintain the order in which the alphabetical elements appear in the given input list, and do the same for the numerical elements.
PROBLEM: ['8987', 'M', 'u', 'd', '6277', '4233', 'y', 'D', 'd', '3387', 'n', '9509', '987', 'S', 'c', '6843', '587', '3545', 'Q', 'B', '779', '9547', 'c', 'r']

SOLUTION: M, u, d, y, D, d, n, S, c, Q, B, c, r, 8987, 6277, 4233, 3387, 9509, 987, 6843, 587, 3545, 779, 9547

PROBLEM: ['C', 'H', '5647', '6485', 'h', '4267', 'n', 'G', 'm', '5701', '7081', '2985', 'D', 's', 'j', '9315', '8391', 'a', 'C', 'O', '7813', '4125', '5763', '1049', 'r', 'p', '6893', 'I', '5801', '9817', '741', '481', '7529']

SOLUTION: C, H, h, n, G, m, D, s, j, a, C, O, r, p, I, 5647, 6485, 4267, 5701, 7081, 2985, 9315, 8391, 7813, 4125, 5763, 1049, 6893, 5801, 9817, 741, 481, 7529

PROBLEM: ['U', '1869', '249', 'W', 'q', '7825', 'l', 'C', 'J', '4275', '3503', 'l', 'F', 'i', 'K', '1217', '8667', '9779', '1477', '445', '2701', 'W', '9035', 'F', '3271', '7013', '5279', '9831', 'g', '593', 'j', '9507']

SOLUTION:
U, W, q, l, C, J, l, F, i, K, W, F, g, j, 1869, 249, 7825, 4275, 3503, 1217, 8667, 9779, 1477, 445, 2701, 9035, 3271, 7013, 5279, 9831, 593, 9507