#include <iostream>
#include <algorithm>

using namespace std;


void main()
{
    string arr = "0000000000001111";
    sort(arr.begin(), arr.end());
    do{
        cout << arr.c_str() << endl;
    } while (next_permutation(arr.begin(), arr.end()));
}