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.

Q: ['9779', 'z', 'p', 'W', '7659', '2619', 'a', '3109', 'i', 'R', 'a', '5287', 'j', '3473', '4907', '7261', 'h', '5289', '43', 'l', 'M', 'o', 'm']

A: z, p, W, a, i, R, a, j, h, l, M, o, m, 9779, 7659, 2619, 3109, 5287, 3473, 4907, 7261, 5289, 43
****
Q: ['X', '4861', '4531']

A: X, 4861, 4531
****
Q: ['n', 'P', 'j', '5793', '4387', 'x', '7763', 'u', 'p', 'M', '8667', '2955', 'l', '7905', 'S', '8785', '1351', 'c', 'S', 'M', '1319', '481', 'b', '3869', 'U', '3943', 'p', 'b', 'J', '8405', 'c', '1993', '2599', '6837']

A:
n, P, j, x, u, p, M, l, S, c, S, M, b, U, p, b, J, c, 5793, 4387, 7763, 8667, 2955, 7905, 8785, 1351, 1319, 481, 3869, 3943, 8405, 1993, 2599, 6837
****