单点时限: 1.0 sec
内存限制: 256 MB
Setsuna is almost out of money! Therefore, she always thinks about ways to get rich overnight.
She finds that buying lottery tickets is a wonderful choice, and she decides to use her lucky number as the lottery number.
Setsuna uses some unique methods to pick her lucky numbers. She will first select
It is unnecessary to use all the cards, and it is possible that such lucky number does not exist.
Because she is daydreaming of getting rich, only you can help her find this lucky number.
The input consists of multiple test cases.
The first line contains a single integer
Each of the next
It is guaranteed that the sum of
For each test case given in the input, print the lucky number(without leading zero) or
6 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1
12 4 0 98765432100 9876543120 987654312