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]: ['q', 'u', '199', 'v', '249']
[EX A]: 1, 2, 4, 9

[EX Q]: ['x', '325', 'i', 'n', 'i', 'w', 't']
[EX A]: 2, 3, 5

[EX Q]: ['361', '123', 'q', '393', '283', '329', 'g', '213', '239', 'n', '395', 'p']
[EX A]:
1, 2, 3, 5, 6, 8, 9