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.
--------
Question: ['n', 'm', 'u', '267']

Answer: 2, 6, 7


Question: ['z', '143', 'o', '365', 'g', 'h', 'y', 'p', 'j']

Answer: 1, 3, 4, 5, 6


Question: ['u', '95', 'k', '155', '123', '237', 'r', 'x', '179', 'v', '137', '107', '271', '315']

Answer:
0, 1, 2, 3, 5, 7, 9