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: ['z', '4877', 'j']

SOLUTION: z, j, 4877

PROBLEM: ['9557', '3765', 'u', '2523', '1195', '5499', 'Z', 'E', '3021', 'a', 'e', '6245', 'f', '8035', '7325', '3311', '3145', 'U', '9169', 'P', 'h', 'R', '8863', 'H', 'M', '4817', '6159', '359', 'x', 't', 'a', '2151']

SOLUTION:
u, Z, E, a, e, f, U, P, h, R, H, M, x, t, a, 9557, 3765, 2523, 1195, 5499, 3021, 6245, 8035, 7325, 3311, 3145, 9169, 8863, 4817, 6159, 359, 2151