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]: ['u', 'z', 'p', '99', 'b']
[EX A]: 9

[EX Q]: ['l', 'm', 'h', '87', '265', 'e', '415', '325', 'p', 'b', '385']
[EX A]: 1, 2, 3, 4, 5, 6, 7, 8

[EX Q]: ['q', 'r', 's', '301', '313', 's', 'i', '435', '321', 'd', '29', '317', '113']
[EX A]:
0, 1, 2, 3, 4, 5, 7, 9