#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n0, n1, n2;
  cin >> t;
  while (t--) {
    cin >> n0 >> n1 >> n2;
    if (n0 == 0) {
      for (int i = 1; i <= n2; i++) cout << 1;
      for (int i = 1; i <= n1 + 1; i++) {
        if (i & 1)
          cout << 1;
        else
          cout << 0;
      }
    } else {
      if (n0 > 0 && n1 == 0 && n2 == 0) {
        for (int i = 1; i <= n0 + 1; i++) cout << 0;
      } else {
        for (int i = 1; i <= n2 + 1; i++) cout << 1;
        for (int i = 1; i <= n0; i++) cout << 0;
        for (int i = 1; i <= n1; i++) {
          if (i & 1)
            cout << 0;
          else
            cout << 1;
        }
      }
    }
    cout << "\n";
  }
}
