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.

Q: ['333', '207', '13', '339', 'n', '387']

A: 0, 1, 2, 3, 7, 8, 9
****
Q: ['j', 'w', 'h', 'r', 'w', 'h', 'd', 'f', '81', 'g', '145']

A: 1, 4, 5, 8
****
Q: ['459', 'p', 'r', 'i', '223', 'r', 'l', 'd', 'q', 's', '383', 'n', '169', 'g']

A:
1, 2, 3, 4, 5, 6, 8, 9
****