1013 - Nurse Schedule Listing

Time Limit: 1s Memory Limit: 128MB

Submissions: 447 Solved: 92
Description

The director of a hospital want to schedule a working plan for a nurse in a given period of N consecutive days 1,..., N. Due to the policy of the hospital, each nurse cannot work all the days 1,..., N. Instead, there must be days off in which the nurse need to take a rest. A working plan is a sequence of disjoint working periods. A working period of a nurse is defined to be a sequence of consecutive days on which the nurse must work and the length of the working period is the number of consecutive days of that working period. The hospital imposes two constraints:

  • Each nurse can take a rest only one day between two consecutive working periods. it means that if the nurse takes a rest today, then she has to work tomorrow.
  • The length of each working period must be greater or equal to K1 and less than or equal to K2.

The director of the hospital to know all possible working plans satisfying above constraint?   

Input

The input consists of one line which contains 3 positive integers N, K1, K2 (N ≤  200, K1<K2 ≤ 70)

Output

The output consists of lines each of which describes a working plans represented by a binary sequence (bit 1 means day on, and bit 0 means day off) satisfying the above constraints.

Sample Input
6 2 3
Sample Output
011011
110110
110111
111011
Hint

There are 4 working plans described as follows:
working plan 1  off  on  on off on  on
working plan 2  on  on  off  on  on  off
working plan 3  on  on  off  on  on  on
working plan 4  on  on  on  off  on  on

Source