Lights out, 7-segment version Given a 7-segment display with some segments switched on and some off, find a sequence of digits (0-9), such that after toggling the corresponding segments for each digit, all segments are switched off.

Example

  _
  _    [3] =&gt;     |   [1] =&gt;    [OFF]
  _               |


Numbers and their corresponding segments:

 _         _   _         _    _    _    _    _ 
| |    |   _|  _|  |_|  |_   |_     |  |_|  |_|
|_|    |  |_   _|    |   _|  |_|    |  |_|   _|


Rules

Codegolf ⊨ shortest entry wins.

Input

A non-empty list of segments which are switched on, given as


A sequence of numbers. Segments are numbered from top to bottom, left to right; starting from 0 or 1. Numbers need not be in order.
A single 7-bit digit. MSB/LSB not specified (thus you can choose).


Non-numeric characters between numbers are allowed (but not required to be supported).

Eg. for number 7: 136 or 1010010 or 0100101

Output

A sequence of numbers to be "applied" to the display. Not restricted in any way, such as order of the digits. Eg. for initial state corresponding to number 1, valid outputs would be 1, 111, 010, etc.

An alternative output is a 10-bit digit (again, MSB/LSB is your choice). Eg. for 1 as input, the output would be 1000000000 or 0000000001.

Some combinations have several non-repetitive solutions, eg. segments corresponding to the uppercase letter H can be switched off by 013, but also 489 and 0258.

If no solution exists (which I believe is not possible), the output is empty.
Jelly, 26 25 bytes
2ṗ⁵’µ×“wØ][:koR¶{‘^/=µÐfḢ

Try it online!
Takes input as a 7-bit integer. Returns the binary form of a 10-bit integer.
This just brute forces all possibilities. Remove the Ḣ to get all possible outputs or replace it with an X to get a random possible output.
Magic Visualization Program!
How it works
2ṗ⁵’µ×“wØ][:koR¶{‘^/=µÐfḢ  - main link, takes one integer
2ṗ⁵’                       - generate all length-10 binary arrays
    µ                µÐf   - now we find those arrays which correspond to digit-
                              sequences which work to switch off all segments:
                              Filter (keep) those arrays which:
     ×                      - multiplied by 
      “wØ][:koR¶{‘          - [119, 18, 93, 91, 58, 107, 111, 82, 127, 123] 
                               (encoding for turned-on segments given number)
                  ^/        - reduced by XOR
                    =      - are equal to (implicit) the program's input
                        Ḣ  - output the first of these valid arrays