#include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <cassert>

using namespace std;

void input(int& m, int& p, int& q)
{
    //ifstream fin("input.txt");

    std::cin >> m >> p >> q;
    
    //fin.close();
}

void fillVec(vector <int>& elements, int m, int p, int q)
{
    fill_n(elements.begin() + m, p, 1); // filling the vectors with correct amount of numbers. The 0's all already there, so I only put the 1's, and the 2's in.
    fill_n(elements.begin() + m + p, q, 2);
}

void print(const vector<int>& nums, ostream& out)
{
    for (int a : nums) { out << a << ' '; }
    out << endl;
}

void permute(vector<int>& nums, ostream& out) 
{
    assert(std::is_sorted(nums.begin(), nums.end()));
    do {
        print(nums, out); 
    } while (std::next_permutation(nums.begin(), nums.end()));
}

int main()
{
    int m, p, q;

    input(m, p, q);

    vector <int> elements(m + p + q);
    fillVec(elements, m, p, q);

    //ofstream fout("output.txt");

    permute(elements, std::cout);
    
    //fout.close();

    return 0;
}