#include <bits/stdc++.h>
using namespace std;
vector<string> answers;
void print_vector(vector<string> a) {
  vector<string>::iterator it;
  for (it = a.begin(); it != a.end(); it++) {
    cout << *it << endl;
  }
}
void string_construct(string &s, int n, int type) {
  if (type == 0) {
    if (!n)
      s = "";
    else {
      s = "00";
      n--;
      while (n--) {
        s = s + "0";
      }
    }
  } else if (type == 1) {
    if (!n)
      s = "";
    else {
      s = "01";
      n--;
      while (n--) {
        if (s[s.length() - 1] == '0')
          s = s + "1";
        else
          s = s + "0";
      }
    }
  } else if (type == 2) {
    if (!n)
      s = "";
    else {
      s = "11";
      n--;
      while (n--) {
        s = s + "1";
      }
    }
  }
}
string string_add(string s0, string s1, string s2) {
  string s;
  s = "";
  if (s0.length()) {
    s = s0;
  }
  if (s1.length() && s.length()) {
    s = s.substr(0, s.length() - 1) + s1;
  } else if (s1.length() && !s.length()) {
    s = s1;
  }
  if (s2.length() && s.length()) {
    s = s.substr(0, s.length() - 1) + s2;
  } else if (s2.length() && !s.length()) {
    s = s2;
  }
  return s;
}
void solve() {
  int n0, n1, n2;
  cin >> n0 >> n1 >> n2;
  string s0, s1, s2;
  if (n1 % 2 != 0 || n1 == 0) {
    string_construct(s0, n0, 0);
    string_construct(s1, n1, 1);
    string_construct(s2, n2, 2);
    answers.push_back(string_add(s0, s1, s2));
  } else if (n1 % 2 == 0) {
    string_construct(s0, n0, 0);
    string_construct(s1, n1 - 1, 1);
    string_construct(s2, n2, 2);
    answers.push_back("1" + string_add(s0, s1, s2));
  }
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
  print_vector(answers);
  return 0;
}
