/*
* @Author: YMYS
* @Date: 2024-12-15 20:18:35
* @LastEditTime: 2024-12-16 15:38:33
* @FilePath: \VScode-C&C++-Coding\newcode\round\72\3.cpp
* @URL:https://ac.nowcoder.com/acm/contest/98256/C
* @Description: 小红的01串(三)
*/
#pragma GCC target ("avx")
#pragma GCC optimize(3,"Ofast","inline")
#include<bits/stdc++.h>
using namespace std;
using namespace __gnu_cxx;
#define FRE_in freopen("D:\\daily_Coding\\VScode-C&C++-Coding\\in.in", "r", stdin)
#define FRE_out freopen("D:\\daily_Coding\\VScode-C&C++-Coding\\out.out", "w", stdout)
#define IOS std::ios::sync_with_stdio(false);cin.tie(0); cout.tie(0)
#define int long long
#define endl '\n'
#define x first
#define y second
#define INF 0x3f3f3f3f3f3f3f3f
#define pb push_back
#define vc vector
typedef pair<int, int> PII;
typedef long long ll;
int gcd(int a, int b){return b ? gcd(b, a % b) : a;}
int lcm(int a,int b){return a*b / gcd(a,b);}
int lcm_of_Array(int arr[], int n) {int lcm = arr[0];for (int i = 1; i < n; ++i) {lcm = (lcm * arr[i]) / gcd(lcm, arr[i]);}return lcm;}
int qmi(int a, int b, int mod){int res=1%mod;a%=mod;while(b){if(b&1)res=res*a%mod;a=a*a%mod;b>>=1;}return res;}
int A(int n, int m){int w = 1;while (m--){w = w * n;n -= 1;}return w;}
int C(int n, int m){int w = 1;m = min(m, n - m);for (int i = 1; i <= m; ++i){w = w * (n - m + i) / i;}return w;}
#define len(x) (int)((x).size())
#define out(x...) cout << __LINE__ << ":" << #x << "->";err(x);
void err() {cout << endl;}
template<typename T, typename... U> void err(T arg, U &... args) {cout << arg << " ";err(args...);}
mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count());
int T,a,b,k;
void solve(){
cin>>a>>b>>k;
char A='0', B='1';
if(2*min(a,b) - (a==b) < k || k==0 && min(a,b)!=0){
cout<<-1<<endl;
return;
}
//保证a大b小
if(a<b) swap(a,b), swap(A,B);
string str;
str.push_back(A);
a--;
int cmp=1;
for(int i=1;i<=k;i++){
if(cmp){
str.push_back(B);
b--;
}else{
str.push_back(A);
a--;
}
cmp ^= 1;
}
if(str.back() == B){
while (a)
{
a--;
str = A + str;
}
while (b)
{
b--;
str = str + B;
}
}else{
str.pop_back();
while (a)
{
str = A + str;
a--;
}
while (b)
{
str = str + B;
b--;
}
str.push_back(A);
}
cout<<str<<endl;
}
signed main()
{
#ifdef ABC
FRE_in;
FRE_out;
#endif
IOS;
cin>>T;
while(T--){
solve();
}
return 0;
}