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.

[EX Q]: ['z', '143', 'o', '365', 'g', 'h', 'y', 'p', 'j']
[EX A]: 1, 3, 4, 5, 6

[EX Q]: ['45', '95', 'y', '363', '265', '307', '309', '423']
[EX A]: 0, 2, 3, 4, 5, 6, 7, 9

[EX Q]: ['135', '449', '153', '317', '405', 'y', '207', '23', '33', 'f']
[EX A]:
0, 1, 2, 3, 4, 5, 7, 9