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: ['y', 'o', '287', 'm', 's', '61']

Answer: 1, 2, 6, 7, 8


Question: ['u', 'm', 's', '101', '427', 'h', 'i', '463', 'j', '77', '465', 'r']

Answer: 0, 1, 2, 3, 4, 5, 6, 7


Question: ['27', 'm', '33', '35', 'g', '65', 'm', 'v', '399']

Answer:
2, 3, 5, 6, 7, 9