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]: ['g', 'j', '239', 'w', 'q', 'm', 'a', 'l', 'n', 'p', 'i', 'r']
[EX A]: 2, 3, 9

[EX Q]: ['t', 'y', '331']
[EX A]: 1, 3

[EX Q]: ['127', 'r']
[EX A]:
1, 2, 7