#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int T;
int main() {
  cin >> T;
  while (T--) {
    int a, b, c;
    cin >> c >> b >> a;
    string s;
    if (a > 0) {
      s += "1";
      for (int i = 0; i < a; i++) s += "1";
      if (b > 0 && b % 2 == 1) {
        for (int i = 0; i < b; i++) {
          if (i % 2 == 0)
            s += "0";
          else
            s += "1";
        }
        if (c > 0) {
          if (s[s.length() - 1] != '0') s += "0";
          for (int i = 0; i < c; i++) s += "0";
        }
      } else if (b > 0 && b % 2 == 0) {
        for (int i = 0; i < b - 1; i++) {
          if (i % 2 == 0)
            s += "0";
          else
            s += "1";
        }
        if (c > 0) {
          if (s[s.length() - 1] != '0') s += "0";
          for (int i = 0; i < c; i++) s += "0";
        }
        cout << '0';
        cout << s << endl;
        continue;
      } else if (c > 0) {
        if (s[s.length() - 1] != '0') s += "0";
        for (int i = 0; i < c; i++) s += "0";
      }
    } else if (b > 0) {
      s += "1";
      if (b > 0 && b % 2 == 1) {
        for (int i = 0; i < b; i++) {
          if (i % 2 == 0)
            s += "0";
          else
            s += "1";
        }
        if (c > 0) {
          if (s[s.length() - 1] != '0') s += "0";
          for (int i = 0; i < c; i++) s += "0";
        }
      } else if (b > 0 && b % 2 == 0) {
        for (int i = 0; i < b - 1; i++) {
          if (i % 2 == 0)
            s += "0";
          else
            s += "1";
        }
        if (c > 0) {
          if (s[s.length() - 1] != '0') s += "0";
          for (int i = 0; i < c; i++) s += "0";
        }
        cout << '0';
        cout << s << endl;
        continue;
      } else if (c > 0) {
        if (s[s.length() - 1] != '0') s += "0";
        for (int i = 0; i < c; i++) s += "0";
      }
    } else if (c > 0) {
      s += "0";
      for (int i = 0; i < c; i++) s += "0";
    }
    cout << s << endl;
  }
}
