TASK DEFINITION: In this task, you are given an input list A. You need to extract and sort the unique digits used in the list in ascending order. Return -1 if there is no digit in the list.
PROBLEM: ['p', '231', 'd', 'i', '33', '431']

SOLUTION: 1, 2, 3, 4

PROBLEM: ['f', 'u', 'd', '51', 'w', '449', 'z', '313', '153', 'z', '319']

SOLUTION: 1, 3, 4, 5, 9

PROBLEM: ['79', 'd', '499', 'i', '447', 'p', '15', 'n', '107', 'l', 'o', '167', '391']

SOLUTION:
0, 1, 3, 4, 5, 6, 7, 9