instruction:
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:
['23', 'p', '409', '305', 'z', 'q', '295', '391']
answer:
0, 1, 2, 3, 4, 5, 9


question:
['r', '495', '383', 'd', '369', '323', 'e', 'c', '149', 'q', '487', 'q', 'c']
answer:
1, 2, 3, 4, 5, 6, 7, 8, 9


question:
['497', '253', 'z', 'd', '263', 'd', 'i', 'q', '57', '7', '79', '231', 'q', '251']
answer:

1, 2, 3, 4, 5, 6, 7, 9