import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigInteger;
import java.net.PortUnreachableException;
import java.util.*;

// written by luchy0120

public class Main {
    public static void main(String[] args) throws Exception {

        new Main().run();
    }

    static int groups = 0;
    static int[] fa;
    static int[] sz;

    static void init(int n) {
        groups = n;
        fa = new int[n];
        for (int i = 1; i < n; ++i) {
            fa[i] = i;
        }
        sz = new int[n];
        Arrays.fill(sz, 1);
    }

    static int root(int p) {
        while (p != fa[p]) {
            fa[p] = fa[fa[p]];
            p = fa[p];
        }
        return p;
    }

    static void combine(int p, int q) {
        int i = root(p);
        int j = root(q);
        if (i == j) {
            return;
        }
        if (sz[i] < sz[j]) {
            fa[i] = j;
            sz[j] += sz[i];
        } else {
            fa[j] = i;
            sz[i] += sz[j];
        }
        groups--;
    }

    int child[];
    int color[],dfn[],low[],stack[],cnt[];
    boolean vis[];
    boolean iscut[];
    int deep,top,n,m,sum,ans;
    List<Integer> g[];
    int root = 0;
    //  无向图的强连通分量
    void tarjanNonDirect(int u1) {

        int stk[] = new int[10001];
        int fatk[] = new int[10001];
        int p = 0;
        stk[p] = u1;
        fatk[p] = -1;
        p= 1;
        ot: while(p>0) {
            int u  = stk[p-1];
            int fa = fatk[p-1];

            if(dfn[u]==0) {
                low[u] = dfn[u] = ++deep;
            }
            // stack[top++] = u;

            for (; h[u] != -1; h[u] = ne[h[u]]) {
                int v = to[h[u]];
                if (dfn[v] == 0) {
                    //tarjanNonDirect(v);

                    fatk[p] = u;
                    stk[p++] = v;
                    continue ot;
                } else {
                    low[u] = Math.min(low[u], dfn[v]);
                    // 没有特判是否直接指向父亲
                    // 回边，使用dfn【v】更新low【u】,因为可能是指向父亲，而父亲的low可能比较小
                }
            }
            --p;

            if (fa != -1) {
                low[fa] = Math.min(low[fa], low[u]);
                if (low[u] >= dfn[fa]) {
                    if (fa != root || ++child[fa] > 1) {     // 不是root，直接记为cut，是root，判断是否有两个儿子
                        iscut[fa] = true;
                    }
                    ++dcc_cnt;
                    // 一个割点可能会被多个点双共享
                    //  int z = -1;
                    //    do {
                    //        z = stack[--top];
                    //      dcc[dcc_cnt].add(z);
                    //    } while(z != v);
                    //   dcc[dcc_cnt].add(u);
                }

            }

        }
    }
    int gd = 0;
    int id =-1;
    int scc_cnt = 0;
    int sccno[];

//    void solve() {
//
//    }

//    int get_room(int i,int j){
//        return i/3*3 + j/3;
//    }

//    int a[][] = new int[9][9];
//    int space = 0;
//
//    boolean vis_row[][] = new boolean[9][10];
//    boolean vis_col[][] = new boolean[9][10];
//    boolean vis_room[][] = new boolean[9][10];
//    int val[][][] =new int[9][9][];
//    int prepare[][];
//
//    void dfs(int rt){
//
//    }

    int h[],to[],ne[];int ct =0;
    void add(int u,int v){
        // u--;v--;
        to[ct] = v;
        ne[ct] = h[u];
        h[u] = ct++;

    }

    int dcc_cnt = 0;
    int time = 0;

    private static double f(double x) {
        return Math.pow(Math.abs(x), 0.5) + (5*(Math.pow(x, 3)));
    }

    void dfs(int rt,int fa){
        size[rt]  =1;
        for(int i=h[rt];i!=-1;i=ne[i]){
            int v = to[i];
            if(v==fa) continue;
            dep[v] = dep[rt]+1;
            dfs(v,rt);
            size[rt] += size[v];
        }
    }

    int size[];int dep[];

    long get(int i,int i1,int j,int j1){
        return s[i1][j1] - s[i-1][j1] - s[i1][j-1] + s[i-1][j-1];
    }
    long mod = 1000000007;
    long sv(int i,int i1,int j,int j1,int qie){

        if(dp[i][i1][j][j1][qie]!=0) return dp[i][i1][j][j1][qie];
        if(qie==0) return 1;
        long t = 0;
        for(int k=i+1;k<=i1;++k){
            long num = get(i,k-1,j,j1);
            long num1 = get(k,i1,j,j1);
            if(num>0&&num1>0){
                t += sv(k,i1,j,j1,qie-1);
                t %= mod;
            }
        }
        for(int k=j+1;k<=j1;++k){
            long num = get(i,i1,j,k-1);
            long num1 = get(i,i1,k,j1);
            if(num>0&&num1>0){
                t += sv(i,i1,k,j1,qie-1);
                t %= mod;
            }
        }
        return dp[i][i1][j][j1][qie] = t;
    }

    long s[][];
    long dp[][][][][];
    public int ways(String[] p, int k) {
        int l  = p.length;
        int ll = p[0].length();

        dp = new long[l+1][l+1][ll+1][ll+1][k+1];
        s  = new long[l+1][ll+1];

        for(int i=1;i<=l;++i){
            for(int j=1;j<=ll;++j){
                int c = 0;
                if(p[i-1].charAt(j-1)=='A'){
                    c++;
                }
                s[i][j] = s[i-1][j] + s[i][j-1] - s[i-1][j-1] + c;
            }
        }

        return (int)sv(1,l,1,ll,k-1);

    }

    void solve() {

        int t  =ni();
        for(int i=0;i<t;++i){
            int f[]  = na(3);
            StringBuilder sb  =new StringBuilder();
            for(int j=0;j<f[2]+1;++j){
                sb.append('1');
            }
            if(f[1]%2==1){
                int v = 0 ;
                for(int j=0;j<f[1];++j){
                    sb.append(v);v ^= 1;
                }
                for(int j=0;j<f[0];++j){
                    sb.append(0);
                }
                println(sb);
            }else{
                for(int j=0;j<f[0]+1;++j){
                    sb.append(0);
                }
                int v = 1;
                f[1]--;
                for(int j=0;j<f[1];++j){
                    sb.append(v);v ^= 1;
                }
                println(sb);
            }

        }

    }

      //  println(width);
//      //  println(height);
//        int i  =ni();
//        int j  =ni();

//        for(int i=0;i<height;++i){
//            for(int j=0;j<width;++j){
//               int me =  bi.getRGB(i,j);
//               print(me==-1?0:1);
//            }
//            println();
//        }

//        int minx = bi.getMinX();
//        int miny = bi.getMinY();
//        System.out.println("width=" + width + ",height=" + height + ".");
//        System.out.println("minx=" + minx + ",miniy=" + miny + ".");
//        int b[][][] = new int[64][64][3];
//
//        for (int i = minx; i < width; i++) {
//            for (int j = miny; j < height; j++) {
//                int pixel = bi.getRGB(i, j);
//              //  print(pixel);
//               // b[j][i] = pixel;
//
//                b[j][i][0] = (pixel & 0xff0000) >> 16;
//                b[j][i][1] = (pixel & 0xff00) >> 8;
//                b[j][i][2] = (pixel & 0xff);
//
//            }
//            println();
//        }
//
//        for(int i=0;i<64;++i){
//            print("\"");
//            for(int j=0;j<64;++j){
//                print(b[i][j][0]<=50?"*":" ");
//            }
//            println("\",");
//        }
//        //println(b[0][0]);

//
//
//
//
//
//            }
//        }
    //    print("No");

//        int n = ni();
//        int m  = n*(n+1)/2;
//        int k = ni();
//        int p = 0;
//
//        double x[] = new double[n];
//        double y[] = new double[n];
//
//        for(int i=0;i<n;++i){
//            x[i] = nd();
//            y[i] = nd();
//        }
//
//        List<Item> li = new ArrayList<>();
//        for(int i=0;i<n;++i){
//            for(int j=i+1;j<n;++j){
//               double r =  (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]);
//               li.add(new Item(r,i,j));
//            }
//        }
//        Collections.sort(li,(xx,yy)->Double.compare(xx.s,yy.s));
//
//        init(n + 1);
//
//        int s = 0;
//        int c = n;
//        for (int i = 0; i < li.size(); ++i) {
//            int p1 = li.get(i).a;
//            int p2 = li.get(i).b;
//            if (root(p1) != root(p2)) {
//                combine(p1, p2);
//                c--;
//                if(c==k-1){
//                    print(roundS(Math.sqrt(li.get(i).s),2));
//                    break;
//                }
//            }
//        }

  //  }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//    }

//    static long mul(long a, long b, long p)
//    {
//        long res=0,base=a;
//        while(b>0)
//        {
//            if((b&1L)>0)
//                res=(res+base)%p;
//            base=(base+base)%p;
//            b>>=1;
//        }
//        return res;
//    }

    static long mod_pow(long k,long n,long p){
        long res = 1L;
        long temp = (k%p+p)%p;
        while(n!=0L){
            if((n&1L)==1L){
                res = ((res*temp)%p+p)%p;
            }
            temp = ((temp * temp)%p+p)%p;
            n = n>>1L;
        }
        return res%p;
    }
    public static String roundS(double result, int scale){
        String fmt = String.format("%%.%df", scale);
        return String.format(fmt, result);
    }

//    void solve() {
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                int v = ni();
//                a[i][j] = v;
//                if(v>0) {
//                    vis_row[i][v] = true;
//                    vis_col[j][v] = true;
//                    vis_room[get_room(i, j)][v] = true;
//                }else{
//                    space++;
//                }
//            }
//        }
//
//
//        prepare = new int[space][2];
//
//        int p = 0;
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                if(a[i][j]==0){
//                    prepare[p][0] = i;
//                    prepare[p][1]= j;p++;
//                    List<Integer> temp =new ArrayList<>();
//                    for(int k=1;k<=9;++k){
//                        if(!vis_col[j][k]&&!vis_row[i][k]&&!vis_room[get_room(i,j)][k]){
//                            temp.add(k);
//                        }
//                    }
//                    int sz = temp.size();
//                    val[i][j] = new int[sz];
//                    for(int k=0;k<sz;++k){
//                        val[i][j][k] = temp.get(k);
//                    }
//                }
//            }
//        }
//        Arrays.sort(prepare,(x,y)->{
//           return Integer.compare(val[x[0]][x[1]].length,val[y[0]][y[1]].length);
//        });
//        dfs(0);
//
//
//
//
//
//
//
//
//
//
//    }

    InputStream is;
    PrintWriter out;

    void run() throws Exception {
        //is = new FileInputStream(new File("C:\\Users\\Luqi\\Downloads\\P3387_9.in"));
        is = System.in;
        out = new PrintWriter(System.out);

        solve();
        out.flush();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private char ncc() {
        int b = readByte();
        return (char) b;
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private String nline() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!isSpaceChar(b) || b == ' ') {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[][] nm(int n, int m) {
        char[][] a = new char[n][];
        for (int i = 0; i < n; i++) a[i] = ns(m);
        return a;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private long[] nal(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++) a[i] = nl();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = (num << 3) + (num << 1) + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = num * 10 + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    void print(Object obj) {
        out.print(obj);
    }

    void println(Object obj) {
        out.println(obj);
    }

    void println() {
        out.println();
    }

    void printArray(int a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }

    void printArray(long a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }
}


import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigInteger;
import java.net.PortUnreachableException;
import java.util.*;

// written by luchy0120

public class Main {
    public static void main(String[] args) throws Exception {

        new Main().run();
    }

    static int groups = 0;
    static int[] fa;
    static int[] sz;

    static void init(int n) {
        groups = n;
        fa = new int[n];
        for (int i = 1; i < n; ++i) {
            fa[i] = i;
        }
        sz = new int[n];
        Arrays.fill(sz, 1);
    }

    static int root(int p) {
        while (p != fa[p]) {
            fa[p] = fa[fa[p]];
            p = fa[p];
        }
        return p;
    }

    static void combine(int p, int q) {
        int i = root(p);
        int j = root(q);
        if (i == j) {
            return;
        }
        if (sz[i] < sz[j]) {
            fa[i] = j;
            sz[j] += sz[i];
        } else {
            fa[j] = i;
            sz[i] += sz[j];
        }
        groups--;
    }

    int child[];
    int color[],dfn[],low[],stack[],cnt[];
    boolean vis[];
    boolean iscut[];
    int deep,top,n,m,sum,ans;
    List<Integer> g[];
    int root = 0;
    //  无向图的强连通分量
    void tarjanNonDirect(int u1) {

        int stk[] = new int[10001];
        int fatk[] = new int[10001];
        int p = 0;
        stk[p] = u1;
        fatk[p] = -1;
        p= 1;
        ot: while(p>0) {
            int u  = stk[p-1];
            int fa = fatk[p-1];

            if(dfn[u]==0) {
                low[u] = dfn[u] = ++deep;
            }
            // stack[top++] = u;

            for (; h[u] != -1; h[u] = ne[h[u]]) {
                int v = to[h[u]];
                if (dfn[v] == 0) {
                    //tarjanNonDirect(v);

                    fatk[p] = u;
                    stk[p++] = v;
                    continue ot;
                } else {
                    low[u] = Math.min(low[u], dfn[v]);
                    // 没有特判是否直接指向父亲
                    // 回边，使用dfn【v】更新low【u】,因为可能是指向父亲，而父亲的low可能比较小
                }
            }
            --p;

            if (fa != -1) {
                low[fa] = Math.min(low[fa], low[u]);
                if (low[u] >= dfn[fa]) {
                    if (fa != root || ++child[fa] > 1) {     // 不是root，直接记为cut，是root，判断是否有两个儿子
                        iscut[fa] = true;
                    }
                    ++dcc_cnt;
                    // 一个割点可能会被多个点双共享
                    //  int z = -1;
                    //    do {
                    //        z = stack[--top];
                    //      dcc[dcc_cnt].add(z);
                    //    } while(z != v);
                    //   dcc[dcc_cnt].add(u);
                }

            }

        }
    }
    int gd = 0;
    int id =-1;
    int scc_cnt = 0;
    int sccno[];

//    void solve() {
//
//    }

//    int get_room(int i,int j){
//        return i/3*3 + j/3;
//    }

//    int a[][] = new int[9][9];
//    int space = 0;
//
//    boolean vis_row[][] = new boolean[9][10];
//    boolean vis_col[][] = new boolean[9][10];
//    boolean vis_room[][] = new boolean[9][10];
//    int val[][][] =new int[9][9][];
//    int prepare[][];
//
//    void dfs(int rt){
//
//    }

    int h[],to[],ne[];int ct =0;
    void add(int u,int v){
        // u--;v--;
        to[ct] = v;
        ne[ct] = h[u];
        h[u] = ct++;

    }

    int dcc_cnt = 0;
    int time = 0;

    private static double f(double x) {
        return Math.pow(Math.abs(x), 0.5) + (5*(Math.pow(x, 3)));
    }

    void dfs(int rt,int fa){
        size[rt]  =1;
        for(int i=h[rt];i!=-1;i=ne[i]){
            int v = to[i];
            if(v==fa) continue;
            dep[v] = dep[rt]+1;
            dfs(v,rt);
            size[rt] += size[v];
        }
    }

    int size[];int dep[];

    long get(int i,int i1,int j,int j1){
        return s[i1][j1] - s[i-1][j1] - s[i1][j-1] + s[i-1][j-1];
    }
    long mod = 1000000007;
    long sv(int i,int i1,int j,int j1,int qie){

        if(dp[i][i1][j][j1][qie]!=0) return dp[i][i1][j][j1][qie];
        if(qie==0) return 1;
        long t = 0;
        for(int k=i+1;k<=i1;++k){
            long num = get(i,k-1,j,j1);
            long num1 = get(k,i1,j,j1);
            if(num>0&&num1>0){
                t += sv(k,i1,j,j1,qie-1);
                t %= mod;
            }
        }
        for(int k=j+1;k<=j1;++k){
            long num = get(i,i1,j,k-1);
            long num1 = get(i,i1,k,j1);
            if(num>0&&num1>0){
                t += sv(i,i1,k,j1,qie-1);
                t %= mod;
            }
        }
        return dp[i][i1][j][j1][qie] = t;
    }

    long s[][];
    long dp[][][][][];
    public int ways(String[] p, int k) {
        int l  = p.length;
        int ll = p[0].length();

        dp = new long[l+1][l+1][ll+1][ll+1][k+1];
        s  = new long[l+1][ll+1];

        for(int i=1;i<=l;++i){
            for(int j=1;j<=ll;++j){
                int c = 0;
                if(p[i-1].charAt(j-1)=='A'){
                    c++;
                }
                s[i][j] = s[i-1][j] + s[i][j-1] - s[i-1][j-1] + c;
            }
        }

        return (int)sv(1,l,1,ll,k-1);

    }

    void solve() {

        int t  =ni();
        for(int i=0;i<t;++i){
            int f[]  = na(3);
            StringBuilder sb  =new StringBuilder();
            if(f[1]>0){
                int v = 0;
             //   if(f[0]>0){

                    for(int j=0;j<f[0]+1;++j){
                        sb.append(0);
                    }

             //       v = 1;
            //    }
              //  if(f[2]>0){

                    for(int j=0;j<f[2]+1;++j){
                        sb.append(1);
                    }
             //       v = 0;
           //     }
               // if(f[0]>0&&f[2]>0) {
                    f[1]--;
             //   }
                for(int j=0;j<f[1];++j){
                    sb.append(v); v ^= 1;
                }

                println(sb);
            }else{
                if(f[0]>0){

                    for(int j=0;j<f[0]+1;++j){
                        sb.append(0);
                    }
                    println(sb);
                }
                if(f[2]>0){

                    for(int j=0;j<f[2]+1;++j){
                        sb.append(1);
                    }
                    println(sb);
                }

            }

        }

    }

    //  println(width);
//      //  println(height);
//        int i  =ni();
//        int j  =ni();

//        for(int i=0;i<height;++i){
//            for(int j=0;j<width;++j){
//               int me =  bi.getRGB(i,j);
//               print(me==-1?0:1);
//            }
//            println();
//        }

//        int minx = bi.getMinX();
//        int miny = bi.getMinY();
//        System.out.println("width=" + width + ",height=" + height + ".");
//        System.out.println("minx=" + minx + ",miniy=" + miny + ".");
//        int b[][][] = new int[64][64][3];
//
//        for (int i = minx; i < width; i++) {
//            for (int j = miny; j < height; j++) {
//                int pixel = bi.getRGB(i, j);
//              //  print(pixel);
//               // b[j][i] = pixel;
//
//                b[j][i][0] = (pixel & 0xff0000) >> 16;
//                b[j][i][1] = (pixel & 0xff00) >> 8;
//                b[j][i][2] = (pixel & 0xff);
//
//            }
//            println();
//        }
//
//        for(int i=0;i<64;++i){
//            print("\"");
//            for(int j=0;j<64;++j){
//                print(b[i][j][0]<=50?"*":" ");
//            }
//            println("\",");
//        }
//        //println(b[0][0]);

//
//
//
//
//
//            }
//        }
    //    print("No");

//        int n = ni();
//        int m  = n*(n+1)/2;
//        int k = ni();
//        int p = 0;
//
//        double x[] = new double[n];
//        double y[] = new double[n];
//
//        for(int i=0;i<n;++i){
//            x[i] = nd();
//            y[i] = nd();
//        }
//
//        List<Item> li = new ArrayList<>();
//        for(int i=0;i<n;++i){
//            for(int j=i+1;j<n;++j){
//               double r =  (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]);
//               li.add(new Item(r,i,j));
//            }
//        }
//        Collections.sort(li,(xx,yy)->Double.compare(xx.s,yy.s));
//
//        init(n + 1);
//
//        int s = 0;
//        int c = n;
//        for (int i = 0; i < li.size(); ++i) {
//            int p1 = li.get(i).a;
//            int p2 = li.get(i).b;
//            if (root(p1) != root(p2)) {
//                combine(p1, p2);
//                c--;
//                if(c==k-1){
//                    print(roundS(Math.sqrt(li.get(i).s),2));
//                    break;
//                }
//            }
//        }

    //  }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//    }

//    static long mul(long a, long b, long p)
//    {
//        long res=0,base=a;
//        while(b>0)
//        {
//            if((b&1L)>0)
//                res=(res+base)%p;
//            base=(base+base)%p;
//            b>>=1;
//        }
//        return res;
//    }

    static long mod_pow(long k,long n,long p){
        long res = 1L;
        long temp = (k%p+p)%p;
        while(n!=0L){
            if((n&1L)==1L){
                res = ((res*temp)%p+p)%p;
            }
            temp = ((temp * temp)%p+p)%p;
            n = n>>1L;
        }
        return res%p;
    }
    public static String roundS(double result, int scale){
        String fmt = String.format("%%.%df", scale);
        return String.format(fmt, result);
    }

//    void solve() {
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                int v = ni();
//                a[i][j] = v;
//                if(v>0) {
//                    vis_row[i][v] = true;
//                    vis_col[j][v] = true;
//                    vis_room[get_room(i, j)][v] = true;
//                }else{
//                    space++;
//                }
//            }
//        }
//
//
//        prepare = new int[space][2];
//
//        int p = 0;
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                if(a[i][j]==0){
//                    prepare[p][0] = i;
//                    prepare[p][1]= j;p++;
//                    List<Integer> temp =new ArrayList<>();
//                    for(int k=1;k<=9;++k){
//                        if(!vis_col[j][k]&&!vis_row[i][k]&&!vis_room[get_room(i,j)][k]){
//                            temp.add(k);
//                        }
//                    }
//                    int sz = temp.size();
//                    val[i][j] = new int[sz];
//                    for(int k=0;k<sz;++k){
//                        val[i][j][k] = temp.get(k);
//                    }
//                }
//            }
//        }
//        Arrays.sort(prepare,(x,y)->{
//           return Integer.compare(val[x[0]][x[1]].length,val[y[0]][y[1]].length);
//        });
//        dfs(0);
//
//
//
//
//
//
//
//
//
//
//    }

    InputStream is;
    PrintWriter out;

    void run() throws Exception {
        //is = new FileInputStream(new File("C:\\Users\\Luqi\\Downloads\\P3387_9.in"));
        is = System.in;
        out = new PrintWriter(System.out);

        solve();
        out.flush();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private char ncc() {
        int b = readByte();
        return (char) b;
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private String nline() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!isSpaceChar(b) || b == ' ') {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[][] nm(int n, int m) {
        char[][] a = new char[n][];
        for (int i = 0; i < n; i++) a[i] = ns(m);
        return a;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private long[] nal(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++) a[i] = nl();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = (num << 3) + (num << 1) + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = num * 10 + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    void print(Object obj) {
        out.print(obj);
    }

    void println(Object obj) {
        out.println(obj);
    }

    void println() {
        out.println();
    }

    void printArray(int a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }

    void printArray(long a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }
}


import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.*;
import java.math.BigInteger;
import java.net.PortUnreachableException;
import java.util.*;

// written by luchy0120

public class Main {
    public static void main(String[] args) throws Exception {

        new Main().run();
    }

    static int groups = 0;
    static int[] fa;
    static int[] sz;

    static void init(int n) {
        groups = n;
        fa = new int[n];
        for (int i = 1; i < n; ++i) {
            fa[i] = i;
        }
        sz = new int[n];
        Arrays.fill(sz, 1);
    }

    static int root(int p) {
        while (p != fa[p]) {
            fa[p] = fa[fa[p]];
            p = fa[p];
        }
        return p;
    }

    static void combine(int p, int q) {
        int i = root(p);
        int j = root(q);
        if (i == j) {
            return;
        }
        if (sz[i] < sz[j]) {
            fa[i] = j;
            sz[j] += sz[i];
        } else {
            fa[j] = i;
            sz[i] += sz[j];
        }
        groups--;
    }

    int child[];
    int color[],dfn[],low[],stack[],cnt[];
    boolean vis[];
    boolean iscut[];
    int deep,top,n,m,sum,ans;
    List<Integer> g[];
    int root = 0;
    //  无向图的强连通分量
    void tarjanNonDirect(int u1) {

        int stk[] = new int[10001];
        int fatk[] = new int[10001];
        int p = 0;
        stk[p] = u1;
        fatk[p] = -1;
        p= 1;
        ot: while(p>0) {
            int u  = stk[p-1];
            int fa = fatk[p-1];

            if(dfn[u]==0) {
                low[u] = dfn[u] = ++deep;
            }
            // stack[top++] = u;

            for (; h[u] != -1; h[u] = ne[h[u]]) {
                int v = to[h[u]];
                if (dfn[v] == 0) {
                    //tarjanNonDirect(v);

                    fatk[p] = u;
                    stk[p++] = v;
                    continue ot;
                } else {
                    low[u] = Math.min(low[u], dfn[v]);
                    // 没有特判是否直接指向父亲
                    // 回边，使用dfn【v】更新low【u】,因为可能是指向父亲，而父亲的low可能比较小
                }
            }
            --p;

            if (fa != -1) {
                low[fa] = Math.min(low[fa], low[u]);
                if (low[u] >= dfn[fa]) {
                    if (fa != root || ++child[fa] > 1) {     // 不是root，直接记为cut，是root，判断是否有两个儿子
                        iscut[fa] = true;
                    }
                    ++dcc_cnt;
                    // 一个割点可能会被多个点双共享
                    //  int z = -1;
                    //    do {
                    //        z = stack[--top];
                    //      dcc[dcc_cnt].add(z);
                    //    } while(z != v);
                    //   dcc[dcc_cnt].add(u);
                }

            }

        }
    }
    int gd = 0;
    int id =-1;
    int scc_cnt = 0;
    int sccno[];

//    void solve() {
//
//    }

//    int get_room(int i,int j){
//        return i/3*3 + j/3;
//    }

//    int a[][] = new int[9][9];
//    int space = 0;
//
//    boolean vis_row[][] = new boolean[9][10];
//    boolean vis_col[][] = new boolean[9][10];
//    boolean vis_room[][] = new boolean[9][10];
//    int val[][][] =new int[9][9][];
//    int prepare[][];
//
//    void dfs(int rt){
//
//    }

    int h[],to[],ne[];int ct =0;
    void add(int u,int v){
        // u--;v--;
        to[ct] = v;
        ne[ct] = h[u];
        h[u] = ct++;

    }

    int dcc_cnt = 0;
    int time = 0;

    private static double f(double x) {
        return Math.pow(Math.abs(x), 0.5) + (5*(Math.pow(x, 3)));
    }

    void dfs(int rt,int fa){
        size[rt]  =1;
        for(int i=h[rt];i!=-1;i=ne[i]){
            int v = to[i];
            if(v==fa) continue;
            dep[v] = dep[rt]+1;
            dfs(v,rt);
            size[rt] += size[v];
        }
    }

    int size[];int dep[];

    long get(int i,int i1,int j,int j1){
        return s[i1][j1] - s[i-1][j1] - s[i1][j-1] + s[i-1][j-1];
    }
    long mod = 1000000007;
    long sv(int i,int i1,int j,int j1,int qie){

        if(dp[i][i1][j][j1][qie]!=0) return dp[i][i1][j][j1][qie];
        if(qie==0) return 1;
        long t = 0;
        for(int k=i+1;k<=i1;++k){
            long num = get(i,k-1,j,j1);
            long num1 = get(k,i1,j,j1);
            if(num>0&&num1>0){
                t += sv(k,i1,j,j1,qie-1);
                t %= mod;
            }
        }
        for(int k=j+1;k<=j1;++k){
            long num = get(i,i1,j,k-1);
            long num1 = get(i,i1,k,j1);
            if(num>0&&num1>0){
                t += sv(i,i1,k,j1,qie-1);
                t %= mod;
            }
        }
        return dp[i][i1][j][j1][qie] = t;
    }

    long s[][];
    long dp[][][][][];
    public int ways(String[] p, int k) {
        int l  = p.length;
        int ll = p[0].length();

        dp = new long[l+1][l+1][ll+1][ll+1][k+1];
        s  = new long[l+1][ll+1];

        for(int i=1;i<=l;++i){
            for(int j=1;j<=ll;++j){
                int c = 0;
                if(p[i-1].charAt(j-1)=='A'){
                    c++;
                }
                s[i][j] = s[i-1][j] + s[i][j-1] - s[i-1][j-1] + c;
            }
        }

        return (int)sv(1,l,1,ll,k-1);

    }

    void solve() {

        int t  =ni();
        for(int i=0;i<t;++i){
            int f[]  = na(3);
            StringBuilder sb  =new StringBuilder();
            if(f[1]>0){
                int v = 0;
                if(f[0]>0){

                    for(int j=0;j<f[0]+1;++j){
                        sb.append(0);
                    }

                    v = 1;
                }
                if(f[2]>0){

                    for(int j=0;j<f[2]+1;++j){
                        sb.append(1);
                    }
                    v = 0;
                }
                if(f[0]>0&&f[2]>0) {
                    f[1]--;
                }
                for(int j=0;j<f[1];++j){
                    sb.append(v); v ^= 1;
                }

                println(sb);
            }else{
                if(f[0]>0){

                    for(int j=0;j<f[0]+1;++j){
                        sb.append(0);
                    }
                    println(sb);
                }
                if(f[2]>0){

                    for(int j=0;j<f[2]+1;++j){
                        sb.append(1);
                    }
                    println(sb);
                }

            }

        }

    }

      //  println(width);
//      //  println(height);
//        int i  =ni();
//        int j  =ni();

//        for(int i=0;i<height;++i){
//            for(int j=0;j<width;++j){
//               int me =  bi.getRGB(i,j);
//               print(me==-1?0:1);
//            }
//            println();
//        }

//        int minx = bi.getMinX();
//        int miny = bi.getMinY();
//        System.out.println("width=" + width + ",height=" + height + ".");
//        System.out.println("minx=" + minx + ",miniy=" + miny + ".");
//        int b[][][] = new int[64][64][3];
//
//        for (int i = minx; i < width; i++) {
//            for (int j = miny; j < height; j++) {
//                int pixel = bi.getRGB(i, j);
//              //  print(pixel);
//               // b[j][i] = pixel;
//
//                b[j][i][0] = (pixel & 0xff0000) >> 16;
//                b[j][i][1] = (pixel & 0xff00) >> 8;
//                b[j][i][2] = (pixel & 0xff);
//
//            }
//            println();
//        }
//
//        for(int i=0;i<64;++i){
//            print("\"");
//            for(int j=0;j<64;++j){
//                print(b[i][j][0]<=50?"*":" ");
//            }
//            println("\",");
//        }
//        //println(b[0][0]);

//
//
//
//
//
//            }
//        }
    //    print("No");

//        int n = ni();
//        int m  = n*(n+1)/2;
//        int k = ni();
//        int p = 0;
//
//        double x[] = new double[n];
//        double y[] = new double[n];
//
//        for(int i=0;i<n;++i){
//            x[i] = nd();
//            y[i] = nd();
//        }
//
//        List<Item> li = new ArrayList<>();
//        for(int i=0;i<n;++i){
//            for(int j=i+1;j<n;++j){
//               double r =  (x[i]-x[j])*(x[i]-x[j]) + (y[i]-y[j])*(y[i]-y[j]);
//               li.add(new Item(r,i,j));
//            }
//        }
//        Collections.sort(li,(xx,yy)->Double.compare(xx.s,yy.s));
//
//        init(n + 1);
//
//        int s = 0;
//        int c = n;
//        for (int i = 0; i < li.size(); ++i) {
//            int p1 = li.get(i).a;
//            int p2 = li.get(i).b;
//            if (root(p1) != root(p2)) {
//                combine(p1, p2);
//                c--;
//                if(c==k-1){
//                    print(roundS(Math.sqrt(li.get(i).s),2));
//                    break;
//                }
//            }
//        }

  //  }
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//    }

//    static long mul(long a, long b, long p)
//    {
//        long res=0,base=a;
//        while(b>0)
//        {
//            if((b&1L)>0)
//                res=(res+base)%p;
//            base=(base+base)%p;
//            b>>=1;
//        }
//        return res;
//    }

    static long mod_pow(long k,long n,long p){
        long res = 1L;
        long temp = (k%p+p)%p;
        while(n!=0L){
            if((n&1L)==1L){
                res = ((res*temp)%p+p)%p;
            }
            temp = ((temp * temp)%p+p)%p;
            n = n>>1L;
        }
        return res%p;
    }
    public static String roundS(double result, int scale){
        String fmt = String.format("%%.%df", scale);
        return String.format(fmt, result);
    }

//    void solve() {
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                int v = ni();
//                a[i][j] = v;
//                if(v>0) {
//                    vis_row[i][v] = true;
//                    vis_col[j][v] = true;
//                    vis_room[get_room(i, j)][v] = true;
//                }else{
//                    space++;
//                }
//            }
//        }
//
//
//        prepare = new int[space][2];
//
//        int p = 0;
//
//        for(int i=0;i<9;++i) {
//            for (int j = 0; j < 9; ++j) {
//                if(a[i][j]==0){
//                    prepare[p][0] = i;
//                    prepare[p][1]= j;p++;
//                    List<Integer> temp =new ArrayList<>();
//                    for(int k=1;k<=9;++k){
//                        if(!vis_col[j][k]&&!vis_row[i][k]&&!vis_room[get_room(i,j)][k]){
//                            temp.add(k);
//                        }
//                    }
//                    int sz = temp.size();
//                    val[i][j] = new int[sz];
//                    for(int k=0;k<sz;++k){
//                        val[i][j][k] = temp.get(k);
//                    }
//                }
//            }
//        }
//        Arrays.sort(prepare,(x,y)->{
//           return Integer.compare(val[x[0]][x[1]].length,val[y[0]][y[1]].length);
//        });
//        dfs(0);
//
//
//
//
//
//
//
//
//
//
//    }

    InputStream is;
    PrintWriter out;

    void run() throws Exception {
        //is = new FileInputStream(new File("C:\\Users\\Luqi\\Downloads\\P3387_9.in"));
        is = System.in;
        out = new PrintWriter(System.out);

        solve();
        out.flush();
    }

    private byte[] inbuf = new byte[1024];
    public int lenbuf = 0, ptrbuf = 0;

    private int readByte() {
        if (lenbuf == -1) throw new InputMismatchException();
        if (ptrbuf >= lenbuf) {
            ptrbuf = 0;
            try {
                lenbuf = is.read(inbuf);
            } catch (IOException e) {
                throw new InputMismatchException();
            }
            if (lenbuf <= 0) return -1;
        }
        return inbuf[ptrbuf++];
    }

    private boolean isSpaceChar(int c) {
        return !(c >= 33 && c <= 126);
    }

    private int skip() {
        int b;
        while ((b = readByte()) != -1 && isSpaceChar(b)) ;
        return b;
    }

    private double nd() {
        return Double.parseDouble(ns());
    }

    private char nc() {
        return (char) skip();
    }

    private char ncc() {
        int b = readByte();
        return (char) b;
    }

    private String ns() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != ' ')
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[] ns(int n) {
        char[] buf = new char[n];
        int b = skip(), p = 0;
        while (p < n && !(isSpaceChar(b))) {
            buf[p++] = (char) b;
            b = readByte();
        }
        return n == p ? buf : Arrays.copyOf(buf, p);
    }

    private String nline() {
        int b = skip();
        StringBuilder sb = new StringBuilder();
        while (!isSpaceChar(b) || b == ' ') {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    private char[][] nm(int n, int m) {
        char[][] a = new char[n][];
        for (int i = 0; i < n; i++) a[i] = ns(m);
        return a;
    }

    private int[] na(int n) {
        int[] a = new int[n];
        for (int i = 0; i < n; i++) a[i] = ni();
        return a;
    }

    private long[] nal(int n) {
        long[] a = new long[n];
        for (int i = 0; i < n; i++) a[i] = nl();
        return a;
    }

    private int ni() {
        int num = 0, b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = (num << 3) + (num << 1) + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    private long nl() {
        long num = 0;
        int b;
        boolean minus = false;
        while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')) {
        }
        ;
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        while (true) {
            if (b >= '0' && b <= '9') num = num * 10 + (b - '0');
            else return minus ? -num : num;
            b = readByte();
        }
    }

    void print(Object obj) {
        out.print(obj);
    }

    void println(Object obj) {
        out.println(obj);
    }

    void println() {
        out.println();
    }

    void printArray(int a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }

    void printArray(long a[],int from){
        int l = a.length;
        for(int i=from;i<l;++i){
            print(a[i]);
            if(i!=l-1){
                print(" ");
            }
        }
        println();
    }
}


import java.util.*;
import java.io.*;

public class Solution{

	public static Integer INT(String s) {
		return Integer.parseInt(s);
	}
	public static Long LONG(String s) {
		return Long.parseLong(s);
	}

	static int mod=(int)1e9+7, oo=Integer.MAX_VALUE, _oo=Integer.MIN_VALUE;
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static Scanner in=new Scanner(System.in);
	static StringBuilder out=new StringBuilder();

	//==================================================================================================================================================

	public static void main(String args[]) throws IOException {

		int t=in.nextInt();
		HashSet<Integer> set=new HashSet<>();
		int a[]=new int[8000];

		label:
		while(t--!=0) {

			StringBuilder out_=new StringBuilder();

			int cnt[]=new int[3];
			for(int i=0; i<=2; i++)
				cnt[i]=in.nextInt();

			if(cnt[0]>0 && cnt[2]>0)
				cnt[1]-=1;

			if(cnt[0]>0) {
				out_.append("00");
				cnt[0]-=1;
			}
			while(cnt[0]>0) {
				out_.append("0");
				cnt[0]-=1;
			}

			if(cnt[2]>0) {
				out_.append("11");
				cnt[2]-=1;
			}
			while(cnt[2]>0) {
				out_.append("1");
				cnt[2]-=1;
			}

			while(cnt[1]>0) {
				out_.append("0");
				cnt[1]-=1;
				if(cnt[1]>0) {
					out_.append("1");
					cnt[1]-=1;
				}
			}

			if(out_.length()==1)
				out_.append("1");
			out.append(out_.toString()+"\n");
		}

		System.out.print(out);
	}
}


import java.util.*;
import java.io.*;

public class Solution{

	public static Integer INT(String s) {
		return Integer.parseInt(s);
	}
	public static Long LONG(String s) {
		return Long.parseLong(s);
	}

	static int mod=(int)1e9+7, oo=Integer.MAX_VALUE, _oo=Integer.MIN_VALUE;
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static Scanner in=new Scanner(System.in);
	static StringBuilder out=new StringBuilder();

	//==================================================================================================================================================

	public static void main(String args[]) throws IOException {

		int t=in.nextInt();
		HashSet<Integer> set=new HashSet<>();
		int a[]=new int[8000];

		label:
		while(t--!=0) {

			StringBuilder out_=new StringBuilder();

			int cnt[]=new int[3];
			for(int i=0; i<=2; i++)
				cnt[i]=in.nextInt();
			int temp_2=cnt[2];

			if(cnt[0]>0 && cnt[2]>0)
				cnt[1]-=1;

			if(cnt[0]>0) {
				out_.append("00");
				cnt[0]-=1;
			}
			while(cnt[0]>0) {
				out_.append("0");
				cnt[0]-=1;
			}

			if(cnt[2]>0) {
				out_.append("11");
				cnt[2]-=1;
			}
			while(cnt[2]>0) {
				out_.append("1");
				cnt[2]-=1;
			}

			if(temp_2==0 && cnt[1]>0) {
				if(out_.length()!=0)
					cnt[1]-=1;
				out_.append("1");
			}
			while(cnt[1]>0) {
				out_.append("0");
				cnt[1]-=1;
				if(cnt[1]>0) {
					out_.append("1");
					cnt[1]-=1;
				}
			}

			out.append(out_.toString()+"\n");
		}

		System.out.print(out);
	}
}


import java.util.*;
import java.io.*;

public class Solution{

	public static Integer INT(String s) {
		return Integer.parseInt(s);
	}
	public static Long LONG(String s) {
		return Long.parseLong(s);
	}

	static int mod=(int)1e9+7, oo=Integer.MAX_VALUE, _oo=Integer.MIN_VALUE;
	static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	static Scanner in=new Scanner(System.in);
	static StringBuilder out=new StringBuilder();

	//==================================================================================================================================================

	public static void main(String args[]) throws IOException {

		int t=in.nextInt();
		HashSet<Integer> set=new HashSet<>();
		int a[]=new int[8000];

		label:
		while(t--!=0) {

			StringBuilder out_=new StringBuilder();

			int cnt[]=new int[3];
			for(int i=0; i<=2; i++)
				cnt[i]=in.nextInt();

			if(cnt[0]>0 && cnt[2]>0)
				cnt[1]-=1;

			if(cnt[0]>0) {
				out_.append("00");
				cnt[0]-=1;
			}
			while(cnt[0]>0) {
				out_.append("0");
				cnt[0]-=1;
			}

			if(cnt[2]>0) {
				out_.append("11");
				cnt[2]-=1;
			}
			while(cnt[2]>0) {
				out_.append("1");
				cnt[2]-=1;
			}

			if(out_.length()==0 && cnt[1]>0)
				out_.append("1");
			while(cnt[1]>0) {
				out_.append("0");
				cnt[1]-=1;
				if(cnt[1]>0) {
					out_.append("1");
					cnt[1]-=1;
				}
			}

			out.append(out_.toString()+"\n");
		}

		System.out.print(out);
	}
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class _DIV4F implements Runnable{
    public static void main(String[] args) {
	    new Thread(null, new _DIV4F(),"Main",1<<27).start();
    }
    @Override
    public void run() {
        FastReader fd = new FastReader();
        PrintWriter out = new PrintWriter(System.out,true);
        int t = fd.nextInt();
        for(int te = 0; te < t; te++){
            int n0 = fd.nextInt();
            int n1 = fd.nextInt();
            int n2 = fd.nextInt();

            if(n1 == 0){
                if(n2 != 0) for(int i = 1; i <= n2+1; i++){ out.print("1"); }
                else for(int i = 1; i <= n0+1; i++){ out.print("0"); }
                out.println();
                continue;
            }
            StringBuilder ans = new StringBuilder();
            for(int i = 1; i <= n0; i++){ ans.append("0"); }
            for(int i = 1; i <= (n1/2)+1; i++){ ans.append("01"); }
            int fone = ans.indexOf("1");
            for(int i = 1; i <= n2; i++){ ans.insert(fone,"1"); }
            out.println(ans);

        }

        out.close();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class _DIV4F implements Runnable{
    public static void main(String[] args) {
	    new Thread(null, new _DIV4F(),"Main",1<<27).start();
    }
    @Override
    public void run() {
        FastReader fd = new FastReader();
        PrintWriter out = new PrintWriter(System.out,true);
        int t = fd.nextInt();
        for(int te = 0; te < t; te++){
            int n0 = fd.nextInt();
            int n1 = fd.nextInt();
            int n2 = fd.nextInt();

            if(n1 == 0){
                if(n2 != 0) for(int i = 1; i <= n2+1; i++){ out.print("1"); }
                else for(int i = 1; i <= n0+1; i++){ out.print("0"); }
                out.println();
                continue;
            }
            StringBuilder ans = new StringBuilder();
            for(int i = 1; i <= n0; i++){ ans.append("0"); }
            for(int i = 1; i <= (n1)+1; i++){
                if(i % 2 == 0){
                    ans.append("1");
                }
                else{
                    ans.append("0");
                }
            }
            int fone = ans.indexOf("1");
            for(int i = 1; i <= n2; i++){ ans.insert(fone,"1"); }
            out.println(ans);

        }

        out.close();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;

public class _DIV4F implements Runnable{
    public static void main(String[] args) {
	    new Thread(null, new _DIV4F(),"Main",1<<27).start();
    }
    @Override
    public void run() {
        FastReader fd = new FastReader();
        PrintWriter out = new PrintWriter(System.out,true);
        int t = fd.nextInt();
        for(int te = 0; te < t; te++){
            int n0 = fd.nextInt();
            int n1 = fd.nextInt();
            int n2 = fd.nextInt();
            int limit = n0+n1+n2+1;

            if(limit-1 == n2){
                for(int i = 0; i < n2+1; i++){ out.print("1"); }
                out.println();
                continue;
            }

            if(limit-1 == n1){
                for(int i = 0; i < (n1/2)+1; i++){ out.print("01"); }
                out.println();
                continue;
            }

            if(limit-1 == n0){
                for(int i = 0; i < n0+1; i++){ out.print("0"); }
                out.println();
                continue;
            }
            StringBuilder ans = new StringBuilder();
            for(int i = 1; i <= n0; i++){ ans.append("0"); }
            for(int i = 1; i <= (n1/2)+1; i++){ ans.append("01"); }
            int fone = ans.indexOf("1");
            for(int i = 1; i <= n2; i++){ ans.insert(fone,"1"); }
            out.println(ans);

        }

        out.close();
    }

    static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            }
            catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}


import java.io.*;
import java.util.*;
public class main {
	static PrintWriter pw;
	public static void printZero(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(0);
		}
	}
	public static void printOne(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(1);
		}
	}
	public static void printZeroOne(int pairs)
	{
		pw.print(0);
		for (int i = 0; i < pairs; i++) {
			if(i%2==0)
			pw.print(1);
			else
			pw.print(0);
		}
	}
	public static void main(String[] args) throws NumberFormatException, IOException
	{
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		pw= new PrintWriter(System.out);
		int t= Integer.parseInt(br.readLine());
		for (int i = 0; i < t; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine());
			int n0 = Integer.parseInt(st.nextToken());
			int n1 = Integer.parseInt(st.nextToken());
			int n2 = Integer.parseInt(st.nextToken());
			if(n1==0 && n2==0)
			{
				printZero(n0);
			}
			else if(n0==0 && n2==0)
			{
				printZeroOne(n1);
			}
			else if(n0==0 && n1==0)
			{
				printOne(n2);
			}
			else if(n2==0)
			{
				printZeroOne(n1-1);printZero(n0);
			}
			else if(n0==0)
			{
				printOne(n2);printZeroOne(n1-1);
			}
			else
			{
				if(n1%2==1)
				{
					printOne(n2);printZeroOne(n1-1);printZero(n0-1);
				}
				else
				{
					printOne(n2);printZeroOne(n1-2);printZero(n0-1);pw.print(1);
				}
			}
			pw.println();

		}
		pw.close();
	}
}


import java.io.*;
import java.util.*;
public class main {
	static PrintWriter pw;
	public static void printZero(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(0);
		}
	}
	public static void printOne(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(1);
		}
	}
	public static void printZeroOne(int pairs)
	{
		pw.print(0);
		for (int i = 0; i < pairs; i++) {
			if(i%2==0)
			pw.print(1);
			else
			pw.print(0);
		}
	}
	public static void main(String[] args) throws NumberFormatException, IOException
	{
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		pw= new PrintWriter(System.out);
		int t= Integer.parseInt(br.readLine());
		for (int i = 0; i < t; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine());
			int n0 = Integer.parseInt(st.nextToken());
			int n1 = Integer.parseInt(st.nextToken());
			int n2 = Integer.parseInt(st.nextToken());
			if(n1==0 && n2==0)
			{
				printZero(n0);
			}
			else if(n0==0 && n2==0)
			{
				printZeroOne(n1);
			}
			else if(n0==0 && n1==0)
			{
				printOne(n2);
			}
			else if(n2==0)
			{
				printZeroOne(n1-1);printZero(n0);
			}
			else if(n0==0)
			{
				printOne(n2);printZeroOne(n1-1);
			}
			else
			{
				if(n1%2==1)
				{
					printOne(n2);printZeroOne(n1-1);printZero(n0-1);
				}
				else
				{
					printOne(n2);printZeroOne(n1-2);printZero(n0);pw.print(1);
				}
			}
			pw.println();

		}
		pw.close();
	}
}


import java.io.*;
import java.util.*;
public class main {
	static PrintWriter pw;
	public static void printZero(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(0);
		}
	}
	public static void printOne(int pairs)
	{
		for (int i = 0; i < pairs+1; i++) {
			pw.print(1);
		}
	}
	public static void printZeroOne(int pairs)
	{
		pw.print(0);
		for (int i = 0; i < pairs; i++) {
			if(i%2==0)
			pw.print(1);
			else
			pw.print(0);
		}
	}
	public static void main(String[] args) throws NumberFormatException, IOException
	{
		BufferedReader br= new BufferedReader(new InputStreamReader(System.in));
		pw= new PrintWriter(System.out);
		int t= Integer.parseInt(br.readLine());
		for (int i = 0; i < t; i++) {
			StringTokenizer st = new StringTokenizer(br.readLine());
			int n0 = Integer.parseInt(st.nextToken());
			int n1 = Integer.parseInt(st.nextToken());
			int n2 = Integer.parseInt(st.nextToken());
			if(n1==0 && n2==0)
			{
				printZero(n0);
			}
			else if(n0==0 && n2==0)
			{
				printZeroOne(n1);
			}
			else if(n0==0 && n1==0)
			{
				printOne(n2);
			}
			else if(n2==0)
			{
				if(n1%2==0)
				{
					printZeroOne(n1-1);printZero(n0);
				}
				else
				{
					pw.print(1);printZeroOne(n1-1);printZero(n0-1);
				}
			}
			else if(n0==0)
			{
				printOne(n2);printZeroOne(n1-1);
			}
			else
			{
				if(n1%2==1)
				{
					printOne(n2);printZeroOne(n1-1);printZero(n0-1);
				}
				else
				{
					printOne(n2);printZeroOne(n1-2);printZero(n0-1);pw.print(1);
				}
			}
			pw.println();

		}
		pw.close();
	}
}


import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException,InterruptedException{
        Scanner sc = new Scanner(System.in);
	       int t=sc.nextInt();
	       while(t-->0) {
	    	int n0=sc.nextInt();
	    	int n1=sc.nextInt();
	    	int n2=sc.nextInt();
	    	String bin="";
	    	int x=0;
	    	if (n1%2==1) x=n1;
	    	else x=n1-1;
	    	for (int i = 0; i < x+1; i++) {
				if(i%2==0) bin+=0;
				else bin+=1;
			}
	    	for (int i = 0; i < n0; i++) {
				bin=0+bin;
			}for (int i = 0; i < n2; i++) {
				bin+=1;
			}
			if (n0==0&&n1==0) {
				bin+=1;
		       }else if (n2==0&&n1==0) {
				bin+=0;
			   }else if(n2==0&&n0==0&&n1%2==0) {
				bin=1+bin;
			}
	    	pw.println(bin);
	       }
        pw.close();
    }

	static PrintWriter pw=new PrintWriter(System.out);
	static char[][] grid;
	static boolean[][] visited;
	static int n,m;
	static boolean binarysearch(long[] arr,long x) {
		int start=0,end=arr.length-1;
		while (start<=end) {
			int mid=(start+end)/2;
			if (arr[mid]==x) {
				return true;
			}else if (arr[mid]>x) {
				end=mid-1;
			}else {
				start=mid+1;
			}
		}
		return false;
	}
	static long gcd(int x,int y) {
		while (x!=y) {
			if(x>y) x-=y;
			else if(x<y) y-=x;
		}
		return x;
	}
	static long lcm(int x,int y) {
		return x*y/gcd(x,y);
	}
	static int[] dx = {1, -1, 0, 0};
	static int[] dy = {0, 0, 1, -1};
	static boolean isValid(int i, int j){
		return i >= 0 && i < n && j >= 0 && j < m && grid[i][j]=='#';
	}
	static void dfs(int x, int y){
		visited[x][y] = true;
		for(int i = 0; i < 4; i++){
				if(isValid(x + dx[i], y + dy[i]) && !visited[x + dx[i]][y + dy[i]]){
					dfs(x + dx[i], y + dy[i]);
				}
			}
	}

	static class Pair{
        int x;
        int y;
        public Pair(int x,int y){
            this.x= x;
            this.y = y;
        }
        public String toString(){
            return x+" " + y;
        }

    }
 	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public boolean hasNext() {
			// TODO Auto-generated method stub
			return false;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}


import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException,InterruptedException{
        Scanner sc = new Scanner(System.in);
	       int t=sc.nextInt();
	       while(t-->0) {
	    	int n0=sc.nextInt();
	    	int n1=sc.nextInt();
	    	int n2=sc.nextInt();
	    	String bin="";
	    	int x=0;
	    	if (n1%2==1) x=n1;
	    	else x=n1-1;
	    	for (int i = 0; i < x+1; i++) {
				if(i%2==0) bin+=0;
				else bin+=1;
			}
	    	for (int i = 0; i < n0; i++) {
				bin=0+bin;
			}for (int i = 0; i < n2; i++) {
				bin+=1;
			}
			if (n0==0&&n1==0) {
				bin+=1;
		       }else if (n2==0&&n1==0) {
				bin+=0;
			   }else if(n2==0&&n0==0) {
				bin=1+bin;
			}
	    	pw.println(bin);
	       }
        pw.close();
    }

	static PrintWriter pw=new PrintWriter(System.out);
	static char[][] grid;
	static boolean[][] visited;
	static int n,m;
	static boolean binarysearch(long[] arr,long x) {
		int start=0,end=arr.length-1;
		while (start<=end) {
			int mid=(start+end)/2;
			if (arr[mid]==x) {
				return true;
			}else if (arr[mid]>x) {
				end=mid-1;
			}else {
				start=mid+1;
			}
		}
		return false;
	}
	static long gcd(int x,int y) {
		while (x!=y) {
			if(x>y) x-=y;
			else if(x<y) y-=x;
		}
		return x;
	}
	static long lcm(int x,int y) {
		return x*y/gcd(x,y);
	}
	static int[] dx = {1, -1, 0, 0};
	static int[] dy = {0, 0, 1, -1};
	static boolean isValid(int i, int j){
		return i >= 0 && i < n && j >= 0 && j < m && grid[i][j]=='#';
	}
	static void dfs(int x, int y){
		visited[x][y] = true;
		for(int i = 0; i < 4; i++){
				if(isValid(x + dx[i], y + dy[i]) && !visited[x + dx[i]][y + dy[i]]){
					dfs(x + dx[i], y + dy[i]);
				}
			}
	}

	static class Pair{
        int x;
        int y;
        public Pair(int x,int y){
            this.x= x;
            this.y = y;
        }
        public String toString(){
            return x+" " + y;
        }

    }
 	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public boolean hasNext() {
			// TODO Auto-generated method stub
			return false;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}


import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException,InterruptedException{
        Scanner sc = new Scanner(System.in);
	       int t=sc.nextInt();
	       while(t-->0) {
	    	int n0=sc.nextInt();
	    	int n1=sc.nextInt();
	    	int n2=sc.nextInt();
	    	String bin="";
	    	if (n1%2==1) {
	    		for (int i = 0; i < n1+1; i++) {
					if(i%2==0) bin+=0;
					else bin+=1;
				}
		    	for (int i = 0; i < n0; i++) {
					bin=0+bin;
				}for (int i = 0; i < n2; i++) {
					bin+=1;
				}
	    	}
	    	else {
	    		for (int i = 0; i < n1; i++) {
					if(i%2==0) bin+=0;
					else bin+=1;
				}
		    	for (int i = 0; i < n0; i++) {
					bin=0+bin;
				}for (int i = 0; i < n2; i++) {
					bin+=1;
				}
				if(n1!=0)bin+=0;
	    	}
			if (n0==0&&n1==0) {
				bin+=1;
		    }else if (n2==0&&n1==0) {
				bin+=0;
		    }
	    	pw.println(bin);
	       }
        pw.close();
    }

	static PrintWriter pw=new PrintWriter(System.out);
	static char[][] grid;
	static boolean[][] visited;
	static int n,m;
	static boolean binarysearch(long[] arr,long x) {
		int start=0,end=arr.length-1;
		while (start<=end) {
			int mid=(start+end)/2;
			if (arr[mid]==x) {
				return true;
			}else if (arr[mid]>x) {
				end=mid-1;
			}else {
				start=mid+1;
			}
		}
		return false;
	}
	static long gcd(int x,int y) {
		while (x!=y) {
			if(x>y) x-=y;
			else if(x<y) y-=x;
		}
		return x;
	}
	static long lcm(int x,int y) {
		return x*y/gcd(x,y);
	}
	static int[] dx = {1, -1, 0, 0};
	static int[] dy = {0, 0, 1, -1};
	static boolean isValid(int i, int j){
		return i >= 0 && i < n && j >= 0 && j < m && grid[i][j]=='#';
	}
	static void dfs(int x, int y){
		visited[x][y] = true;
		for(int i = 0; i < 4; i++){
				if(isValid(x + dx[i], y + dy[i]) && !visited[x + dx[i]][y + dy[i]]){
					dfs(x + dx[i], y + dy[i]);
				}
			}
	}

	static class Pair{
        int x;
        int y;
        public Pair(int x,int y){
            this.x= x;
            this.y = y;
        }
        public String toString(){
            return x+" " + y;
        }

    }
 	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public boolean hasNext() {
			// TODO Auto-generated method stub
			return false;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}


import java.util.*;
import java.io.*;

public class Main {

	public static void main(String[] args) throws IOException,InterruptedException{
        Scanner sc = new Scanner(System.in);
	       int t=sc.nextInt();
	       while(t-->0) {
	    	int n0=sc.nextInt();
	    	int n1=sc.nextInt();
	    	int n2=sc.nextInt();
	    	String bin="";
	    	int x=0;
	    	if (n1%2==1) x=n1;
	    	else x=n1-1;
	    	for (int i = 0; i < x+1; i++) {
				if(i%2==0) bin+=0;
				else bin+=1;
			}
	    	for (int i = 0; i < n0; i++) {
				bin=0+bin;
			}for (int i = 0; i < n2; i++) {
				bin+=1;
			}
			if (n0==0&&n1==0) {
				bin+=1;
		       }else if (n2==0&&n1==0) {
				bin+=0;
			   }
	    	pw.println(bin);
	       }
        pw.close();
    }

	static PrintWriter pw=new PrintWriter(System.out);
	static char[][] grid;
	static boolean[][] visited;
	static int n,m;
	static boolean binarysearch(long[] arr,long x) {
		int start=0,end=arr.length-1;
		while (start<=end) {
			int mid=(start+end)/2;
			if (arr[mid]==x) {
				return true;
			}else if (arr[mid]>x) {
				end=mid-1;
			}else {
				start=mid+1;
			}
		}
		return false;
	}
	static long gcd(int x,int y) {
		while (x!=y) {
			if(x>y) x-=y;
			else if(x<y) y-=x;
		}
		return x;
	}
	static long lcm(int x,int y) {
		return x*y/gcd(x,y);
	}
	static int[] dx = {1, -1, 0, 0};
	static int[] dy = {0, 0, 1, -1};
	static boolean isValid(int i, int j){
		return i >= 0 && i < n && j >= 0 && j < m && grid[i][j]=='#';
	}
	static void dfs(int x, int y){
		visited[x][y] = true;
		for(int i = 0; i < 4; i++){
				if(isValid(x + dx[i], y + dy[i]) && !visited[x + dx[i]][y + dy[i]]){
					dfs(x + dx[i], y + dy[i]);
				}
			}
	}

	static class Pair{
        int x;
        int y;
        public Pair(int x,int y){
            this.x= x;
            this.y = y;
        }
        public String toString(){
            return x+" " + y;
        }

    }
 	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public boolean hasNext() {
			// TODO Auto-generated method stub
			return false;
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public double nextDouble() throws IOException {
			String x = next();
			StringBuilder sb = new StringBuilder("0");
			double res = 0, f = 1;
			boolean dec = false, neg = false;
			int start = 0;
			if (x.charAt(0) == '-') {
				neg = true;
				start++;
			}
			for (int i = start; i < x.length(); i++)
				if (x.charAt(i) == '.') {
					res = Long.parseLong(sb.toString());
					sb = new StringBuilder("0");
					dec = true;
				} else {
					sb.append(x.charAt(i));
					if (dec)
						f *= 10;
				}
			res += Long.parseLong(sb.toString()) / f;
			return res * (neg ? -1 : 1);
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

	}

}


import java.util.*;

public class BinaryStringRepr {
	static Scanner scn = new Scanner(System.in);

	public static void main(String[] args) {

		int t = (int)input();

		while (t-- > 0) {

			int n0 = (int)input();
			int n1 = (int)input();
			int n2 = (int)input();

			if (n1 == 0) {
				if (n0 != 0) {
					for (int i = 0; i <= n0; i++)
						print("0", false);
				} else {
					for (int i = 0; i <= n2; i++)
						print("1", false);
				}
				print("", false);
				continue;
			}

			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < n1 + 1; i++) {
				if ((i & 1) == 1) sb.append("0");
				else sb.append("1");
			}

			for (int i = 0; i < n0; i++)
				sb.insert(1, "0");
			for (int i = 0; i < n2; i++)
				sb.insert(0, "1");

			print(sb, true);
		}

	}

	public static long input() {
		return scn.nextLong();
	}

	public static <T> void print(T t, boolean ln) {
		System.out.print(t);
		if (ln) System.out.println();
	}
}


import java.util.*;

public class BinaryStringRepr {
	static Scanner scn = new Scanner(System.in);

	public static void main(String[] args) {

		int t = (int)input();

		while (t-- > 0) {

			int n0 = (int)input();
			int n1 = (int)input();
			int n2 = (int)input();

			if (n1 == 0) {
				if (n0 != 0) {
					for (int i = 0; i <= n0; i++)
						print("0", false);
				} else {
					for (int i = 0; i <= n2; i++)
						print("1", false);
				}
				print("", true);
				continue;
			}

			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < n1 + 1; i++) {
				if ((i & 1) == 1) sb.append("0");
				else sb.append("1");
			}

			for (int i = 0; i < n0; i++)
				sb.insert(1, "0");
			for (int i = 0; i < n2; i++)
				sb.insert(0, "1");

			print(sb.toString(), true);
		}

	}

	public static long input() {
		return scn.nextLong();
	}

	public static <T> void print(T t, boolean ln) {
		System.out.print(t);
		if (ln) System.out.println();
	}
}


import java.util.*;

public class BinaryStringRepr {
	static Scanner scn = new Scanner(System.in);

	public static void main(String[] args) {

		int t = (int)input();

		while (t-- > 0) {

			int n0 = (int)input();
			int n1 = (int)input();
			int n2 = (int)input();

			if (n0 != 0) {
				while (n0-- > -1) {
					print("0", false);
				}
			}

			if (n2 != 0) {
				while (n2-- > -1) {
					print("1", false);
				}
			}

			if (n1 != 0) {
				while (n1-- > 2) {
					print("01", false);
				}
			}

			print("", true);
		}

	}

	public static long input() {
		return scn.nextLong();
	}

	public static <T> void print(T t, boolean ln) {
		System.out.print(t);
		if (ln) System.out.println();
	}
}


import java.util.*;

public class BinaryStringRepr {
	static Scanner scn = new Scanner(System.in);

	public static void main(String[] args) {

		int t = (int)input();

		while (t-- > 0) {

			int n0 = (int)input();
			int n1 = (int)input();
			int n2 = (int)input();

			if (n0 != 0) {
				while (n0-- > -1) {
					print("0", false);
				}
			}

			if (n2 != 0) {
				while (n2-- > -1) {
					print("1", false);
				}
			}

			if (n1 != 0) {
				while (n1 > 2) {
					print("01", false);
					n1 -= 2;
				}
			}

			print("", true);
		}

	}

	public static long input() {
		return scn.nextLong();
	}

	public static <T> void print(T t, boolean ln) {
		System.out.print(t);
		if (ln) System.out.println();
	}
}


// Don't place your source in a package
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
// Please name your class Main
public class Main {
	public static void main (String[] args) throws java.lang.Exception {
	    Scanner in = new Scanner(System.in);
		//InputReader in = new InputReader(System.in);
		int T =in.nextInt();
		PrintWriter out = new PrintWriter(System.out);
		for(int t=0;t<T;t++){
			int n1=in.nextInt();
			int n2=in.nextInt();
			int n3=in.nextInt();
			Solution s=new Solution();
			s.solution(n1,n2,n3);
		}
		out.flush();
		in.close();
	}

}

class Solution{

	public void solution(int n1,int n2,int n3){
		//
		StringBuilder ones=new StringBuilder();
		StringBuilder zeros=new StringBuilder();

		for(int i=0;i<n1;i++){
			zeros.append("0");
		}
		if(n1!=0)zeros.append("0");

		for(int i=0;i<n3;i++){
			ones.append("1");
		}
		if(n3!=0)ones.append("1");
		if(n2==1){
			if(n1==0&&n3==0){
				System.out.println("01");
				return;
			}
			System.out.println(zeros.toString()+ones.toString());
			return;
		}
		StringBuilder str=new StringBuilder();
		str.append("10");
		boolean zero=false;
		n2-=3;
		for(int i=0;i<n2;i++){
			if(zero){
				str.append("0");
				zero=false;
			}else{
				zero=true;
				str.append("1");
			}
		}
		//System.out.println(zeros.toString());
		//System.out.println(str.toString());
		//System.out.println(ones.toString());
		System.out.println(zeros.toString()+str.toString()+ones.toString());

	}

	//helper function I would use

	public boolean isP(String s){
		int l=0,r=s.length()-1;
		while(l<r){
			if(s.charAt(l)!=s.charAt(r))return false;
			l++;r--;
		}
		return true;
	}

	public int find(int nums[],int x){//union find => find method
		if(nums[x]==x)return x;
		int root=find(nums,nums[x]);
		nums[x]=root;
		return root;
	}

	public boolean check(int grid[][],int r,int c){
		if(r<0||c<0||r>=grid.length||c>=grid[0].length)return false;
		return true;
	}

	public int get(int A[],int i){
		if(i<0||i>=A.length)return -1;
		return A[i];
	}
	public int[] copy(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}
	public void print1(int A[]){
		for(int i:A)System.out.print(i+" ");
		System.out.println();
	}
	public void print2(long A[][]){
		for(int i=0;i<A.length;i++){
			for(int j=0;j<A[0].length;j++){
				System.out.print(A[i][j]+" ");
			}System.out.println();
		}
	}
}


// Don't place your source in a package
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
// Please name your class Main
public class Main {
	public static void main (String[] args) throws java.lang.Exception {
	    Scanner in = new Scanner(System.in);
		//InputReader in = new InputReader(System.in);
		int T =in.nextInt();
		PrintWriter out = new PrintWriter(System.out);
		for(int t=0;t<T;t++){
			int n1=in.nextInt();
			int n2=in.nextInt();
			int n3=in.nextInt();
			Solution s=new Solution();
			s.solution(n1,n2,n3);
		}
		out.flush();
		in.close();
	}

}

class Solution{

	public void solution(int n1,int n2,int n3){
		//
		StringBuilder ones=new StringBuilder();
		StringBuilder zeros=new StringBuilder();

		for(int i=0;i<n1;i++){
			zeros.append("0");
		}
		if(n1!=0)zeros.append("0");

		for(int i=0;i<n3;i++){
			ones.append("1");
		}
		if(n3!=0)ones.append("1");
		if(n2==0){
			System.out.println(zeros.toString()+ones.toString());
			return;

		}
		if(n2==1){
			if(n1==0&&n3==0){
				System.out.println("01");
				return;
			}
			System.out.println(zeros.toString()+ones.toString());
			return;
		}
		StringBuilder str=new StringBuilder();
		str.append("10");
		boolean zero=false;
		n2-=3;
		for(int i=0;i<n2;i++){
			if(zero){
				str.append("0");
				zero=false;
			}else{
				zero=true;
				str.append("1");
			}
		}
		//System.out.println(zeros.toString());
		//System.out.println(str.toString());
		//System.out.println(ones.toString());
		System.out.println(zeros.toString()+str.toString()+ones.toString());

	}

	//helper function I would use

	public boolean isP(String s){
		int l=0,r=s.length()-1;
		while(l<r){
			if(s.charAt(l)!=s.charAt(r))return false;
			l++;r--;
		}
		return true;
	}

	public int find(int nums[],int x){//union find => find method
		if(nums[x]==x)return x;
		int root=find(nums,nums[x]);
		nums[x]=root;
		return root;
	}

	public boolean check(int grid[][],int r,int c){
		if(r<0||c<0||r>=grid.length||c>=grid[0].length)return false;
		return true;
	}

	public int get(int A[],int i){
		if(i<0||i>=A.length)return -1;
		return A[i];
	}
	public int[] copy(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}
	public void print1(int A[]){
		for(int i:A)System.out.print(i+" ");
		System.out.println();
	}
	public void print2(long A[][]){
		for(int i=0;i<A.length;i++){
			for(int j=0;j<A[0].length;j++){
				System.out.print(A[i][j]+" ");
			}System.out.println();
		}
	}
}


// Don't place your source in a package
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;

// Please name your class Main
public class Main {

	static StreamTokenizer in = new StreamTokenizer(new BufferedReader(new InputStreamReader(System.in)));

    static int read() throws IOException {
        in.nextToken();
        return (int) in.nval;
    }
    static String readString() throws IOException {
        in.nextToken();
        return in.sval;
	}

	public static void main (String[] args) throws java.lang.Exception {
	    Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		//InputReader in = new InputReader(System.in);

		int T=in.nextInt();
		for(int t=0;t<T;t++){
			int n1=in.nextInt();
			int n2=in.nextInt();
			int n3=in.nextInt();
			Solution sol=new Solution();
			sol.solution(n1,n2,n3);
		}

	}

}

class Solution{
	//constant variable
	final int MAX=Integer.MAX_VALUE;
	final int MIN=Integer.MIN_VALUE;
	//Set<Integer>adjecent[];
	//////////////////////////////

	public void solution(int n1,int n2,int n3){
		//n1 — the number of such pairs of consecutive characters (substrings) where the number of ones equals 0;   00
		//n2 — the number of such pairs of consecutive characters (substrings) where the number of ones equals 1;   10  01
		//n3 — the number of such pairs of consecutive characters (substrings) where the number of ones equals 2.   11
		StringBuilder str=new StringBuilder();

		if(n1!=0){
			for(int i=0;i<=n1;i++){
				str.append("0");
			}
		}

		if(n3!=0){
			if(n1!=0)n2--;
			for(int i=0;i<=n3;i++){
				str.append("1");
			}

		}

		if(n2!=0){

			if(str.toString().length()==0){
				str.append("0");
			}

			for(int i=0;i<n2;i++){
				int len=str.toString().length();
				char c=str.toString().charAt(len-1);
				if(c=='0'){
					str.append("1");
				}else{
					str.append("0");
				}
			}

		}

		msg(str.toString());

	}

	public long C(long fact[],int i,int j){ // C(20,3)=20!/(17!*3!)
		//return fact[i].divide(fact[i-j].multiply(fact[j]));
		long mod=998244353;
		long a=fact[i];
		long b=((fact[i-j]%mod)*(fact[j]%mod))%mod;
		BigInteger B= BigInteger.valueOf(b);
		long binverse=B.modInverse(BigInteger.valueOf(mod)).longValue();
		return ((a)*(binverse%mod))%mod;
	}

	//map operation
	public void put(Map<Integer,Integer>map,int i){
		if(!map.containsKey(i))map.put(i,0);
		map.put(i,map.get(i)+1);
	}

	public void delete(Map<Integer,Integer>map,int i){
		map.put(i,map.get(i)-1);
		if(map.get(i)==0)map.remove(i);
	}

	/*public void tarjan(int p,int r){
		if(cut)return;
		List<Integer>childs=adjecent[r];
		dis[r]=low[r]=time;
		time++;

		//core for tarjan
		int son=0;
		for(int c:childs){
			if(ban==c||c==p)continue;
			if(dis[c]==-1){
				son++;
				tarjan(r,c);
				low[r]=Math.min(low[r],low[c]);
				if((r==root&&son>1)||(low[c]>=dis[r]&&r!=root)){
					cut=true;
					return;
				}
			}else{
				if(c!=p){
					low[r]=Math.min(low[r],dis[c]);
				}
			}
		}

	}*/

	//helper function I would use
	public void remove(Map<Integer,Integer>map,int i){
		map.put(i,map.get(i)-1);
		if(map.get(i)==0)map.remove(i);
	}

	public void ascii(String s){
		for(char c:s.toCharArray()){
			System.out.print((c-'a')+" ");
		}
		msg("");
	}

	public int flip(int i){
		if(i==0)return 1;
		else return 0;
	}

	public boolean[] primes(int n){
		boolean A[]=new boolean[n+1];
		for(int i=2;i<=n;i++){
			if(A[i]==false){
				for(int j=i+i;j<=n;j+=i){
					A[j]=true;
				}
			}
		}
		return A;
	}

	public void msg(String s){
		System.out.println(s);
	}

	public void msg1(String s){
		System.out.print(s);
	}

	public int[] kmpPre(String p){
		int pre[]=new int[p.length()];
		int l=0,r=1;
		while(r<p.length()){
			if(p.charAt(l)==p.charAt(r)){
				pre[r]=l+1;
				l++;r++;
			}else{
				if(l==0)r++;
				else l=pre[l-1];
			}
		}
		return pre;
	}

	public boolean isP(String s){
		int l=0,r=s.length()-1;
		while(l<r){
			if(s.charAt(l)!=s.charAt(r))return false;
			l++;r--;
		}
		return true;
	}

	public int find(int nums[],int x){//union find => find method
		if(nums[x]==x)return x;
		int root=find(nums,nums[x]);
		nums[x]=root;
		return root;
	}

	public boolean check(int grid[][],int r,int c){
		if(r<0||c<0||r>=grid.length||c>=grid[0].length)return false;
		return true;
	}

	public int get(int A[],int i){
		if(i<0||i>=A.length)return 0;
		return A[i];
	}
	public int[] copy1(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}

	public int[] copy2(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}

	public void print1(long A[]){
		for(long i:A)System.out.print(i+" ");
		System.out.println();
	}
	public void print2(int A[][]){
		for(int i=0;i<A.length;i++){
			for(int j=0;j<A[0].length;j++){
				System.out.print(A[i][j]+" ");
			}System.out.println();
		}
	}

	public int min(int a,int b){
		return Math.min(a,b);
	}

	public int[][] matrixdp(int[][] grid) {
        if(grid.length==0)return new int[][]{};
        int res[][]=new int[grid.length][grid[0].length];
        for(int i=0;i<grid.length;i++){
            for(int j=0;j<grid[0].length;j++){
                res[i][j]=grid[i][j]+get(res,i-1,j)+get(res,i,j-1)-get(res,i-1,j-1);
            }
        }
        return res;
    }

    public int get(int grid[][],int i,int j){
        if(i<0||j<0||i>=grid.length||j>=grid[0].length)return 0;
        return grid[i][j];
    }

	public int[] suffixArray(String s){
		int n=s.length();
		Suffix A[]=new Suffix[n];

		for(int i=0;i<n;i++){
			A[i]=new Suffix(i,s.charAt(i)-'a',0);
		}

		for(int i=0;i<n;i++){
			if(i==n-1){
				A[i].next=-1;
			}else{
				A[i].next=A[i+1].rank;
			}
		}
		Arrays.sort(A);

		for(int len=4;len<A.length*2;len<<=1){
			int in[]=new int[A.length];
			int rank=0;
			int pre=A[0].rank;
			A[0].rank=rank;
			in[A[0].index]=0;
			for(int i=1;i<A.length;i++){//rank for the first two letter
				if(A[i].rank==pre&&A[i].next==A[i-1].next){
					pre=A[i].rank;
					A[i].rank=rank;
				}else{
					pre=A[i].rank;
					A[i].rank=++rank;
				}
				in[A[i].index]=i;
			}

			for(int i=0;i<A.length;i++){
				int next=A[i].index+len/2;
				if(next>=A.length){
					A[i].next=-1;
				}else{
					A[i].next=A[in[next]].rank;
				}
			}

			Arrays.sort(A);
		}

		int su[]=new int[A.length];
		for(int i=0;i<su.length;i++){
			su[i]=A[i].index;
		}
		return su;
	}

}

//suffix array Struct
class Suffix implements Comparable<Suffix>{
	int index;
	int rank;
	int next;
	public Suffix(int i,int rank,int next){
		this.index=i;
		this.rank=rank;
		this.next=next;
	}

	@Override
	public int compareTo(Suffix other) {
		if(this.rank==other.rank){
			return this.next-other.next;
		}
		return this.rank-other.rank;
	}

	public String toString(){
		return this.index+"   "+this.rank+"   "+this.next+"  ";
	}
}

class Wrapper implements Comparable<Wrapper>{
	int spf;int cnt;
	public Wrapper(int spf,int cnt){
		this.spf=spf;
		this.cnt=cnt;
	}

	@Override
	public int compareTo(Wrapper other) {
		return this.spf-other.spf;
	}
}

    class Node{//what the range would be for that particular node
		boolean state=false;
        int l=0,r=0;
		int ll=0,rr=0;
        public Node(boolean state){
            this.state=state;
        }
    }

	class Seg1{
			int A[];
			public Seg1(int A[]){
				this.A=A;
			}

			public void update(int left,int right,int val,int s,int e,int id){
				if(left<0||right<0||left>right)return;
				if(left==s&&right==e){

					A[id]+=val;
					return;
				}
				int mid=s+(e-s)/2; //[s,mid] [mid+1,e]

				if(left>=mid+1){
					update(left,right,val,mid+1,e,id*2+2);
				}else if(right<=mid){
					update(left,right,val,s,mid,id*2+1);
				}else{
					update(left,mid,val,s,mid,id*2+1);
					update(mid+1,right,val,mid+1,e,id*2+2);
				}
			}

			public int query(int i,int add,int s,int e,int id){

				if(s==e&&i==s){
					return A[id]+add;
				}

				int mid=s+(e-s)/2; //[s,mid] [mid+1,e]

				if(i>=mid+1){
					return query(i,A[id]+add,mid+1,e,id*2+2);
				}else{
					return query(i,A[id]+add,s,mid,id*2+1);
				}
			}
	}


// Don't place your source in a package
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
// Please name your class Main
public class Main {
	public static void main (String[] args) throws java.lang.Exception {
	    Scanner in = new Scanner(System.in);
		//InputReader in = new InputReader(System.in);
		int T =in.nextInt();
		PrintWriter out = new PrintWriter(System.out);
		for(int t=0;t<T;t++){
			int n1=in.nextInt();
			int n2=in.nextInt();
			int n3=in.nextInt();
			Solution s=new Solution();
			s.solution(n1,n2,n3);
		}
		out.flush();
		in.close();
	}

}

class Solution{

	public void solution(int n1,int n2,int n3){
		//
		StringBuilder ones=new StringBuilder();
		StringBuilder zeros=new StringBuilder();

		for(int i=0;i<n1;i++){
			zeros.append("0");
		}
		if(n1!=0)zeros.append("0");

		for(int i=0;i<n3;i++){
			ones.append("1");
		}
		if(n3!=0)ones.append("1");

		StringBuilder str=new StringBuilder();
		str.append("10");
		boolean zero=false;
		n2--;
		for(int i=0;i<n2;i++){
			if(zero){
				str.append("0");
				zero=false;
			}else{
				zero=true;
				str.append("1");
			}
		}
		System.out.println(zeros.toString()+str.toString()+ones.toString());

	}

	//helper function I would use

	public boolean isP(String s){
		int l=0,r=s.length()-1;
		while(l<r){
			if(s.charAt(l)!=s.charAt(r))return false;
			l++;r--;
		}
		return true;
	}

	public int find(int nums[],int x){//union find => find method
		if(nums[x]==x)return x;
		int root=find(nums,nums[x]);
		nums[x]=root;
		return root;
	}

	public boolean check(int grid[][],int r,int c){
		if(r<0||c<0||r>=grid.length||c>=grid[0].length)return false;
		return true;
	}

	public int get(int A[],int i){
		if(i<0||i>=A.length)return -1;
		return A[i];
	}
	public int[] copy(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}
	public void print1(int A[]){
		for(int i:A)System.out.print(i+" ");
		System.out.println();
	}
	public void print2(long A[][]){
		for(int i=0;i<A.length;i++){
			for(int j=0;j<A[0].length;j++){
				System.out.print(A[i][j]+" ");
			}System.out.println();
		}
	}
}


// Don't place your source in a package
import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
// Please name your class Main
public class Main {
	public static void main (String[] args) throws java.lang.Exception {
	    Scanner in = new Scanner(System.in);
		//InputReader in = new InputReader(System.in);
		int T =in.nextInt();
		PrintWriter out = new PrintWriter(System.out);
		for(int t=0;t<T;t++){
			int n1=in.nextInt();
			int n2=in.nextInt();
			int n3=in.nextInt();
			Solution s=new Solution();
			s.solution(n1,n2,n3);
		}
		out.flush();
		in.close();
	}

}

class Solution{

	public void solution(int n1,int n2,int n3){
		//
		StringBuilder ones=new StringBuilder();
		StringBuilder zeros=new StringBuilder();

		for(int i=0;i<n1;i++){
			zeros.append("0");
		}
		if(n1!=0)zeros.append("0");

		for(int i=0;i<n3;i++){
			ones.append("1");
		}
		if(n3!=0)ones.append("1");

		StringBuilder str=new StringBuilder();
		str.append("01");
		boolean zero=true;
		n2--;
		for(int i=0;i<n2;i++){
			if(zero){
				str.append("0");
				zero=false;
			}else{
				zero=true;
				str.append("1");
			}
		}
		System.out.println(zeros.toString()+str.toString()+ones.toString());

	}

	//helper function I would use

	public boolean isP(String s){
		int l=0,r=s.length()-1;
		while(l<r){
			if(s.charAt(l)!=s.charAt(r))return false;
			l++;r--;
		}
		return true;
	}

	public int find(int nums[],int x){//union find => find method
		if(nums[x]==x)return x;
		int root=find(nums,nums[x]);
		nums[x]=root;
		return root;
	}

	public boolean check(int grid[][],int r,int c){
		if(r<0||c<0||r>=grid.length||c>=grid[0].length)return false;
		return true;
	}

	public int get(int A[],int i){
		if(i<0||i>=A.length)return -1;
		return A[i];
	}
	public int[] copy(int A[]){
		int a[]=new int[A.length];
		for(int i=0;i<a.length;i++)a[i]=A[i];
		return a;
	}
	public void print1(int A[]){
		for(int i:A)System.out.print(i+" ");
		System.out.println();
	}
	public void print2(long A[][]){
		for(int i=0;i<A.length;i++){
			for(int j=0;j<A[0].length;j++){
				System.out.print(A[i][j]+" ");
			}System.out.println();
		}
	}
}


import java.util.*;

public class MySolution
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1, n2, n3;

        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            StringBuilder sb = new StringBuilder();
            if (n3 != 0)
                for (int j = 0; j <= (n2 == 0 ? n3 : n3 - 1); j++)
                    sb.append("1");

            if (n2 != 0)
                sb.append("1");
            boolean isZero = true;
            for (int j = 0; j < n2; j++) {
                if (isZero) {
                    sb.append("0");
                    isZero = false;
                } else {
                    sb.append("1");
                    isZero = true;
                }
            }
            StringBuilder sbz = new StringBuilder();
            if (n1 != 0)
                for (int j = 0; j <= (n2 == 0 ? n1 : n1 - 1); j++)
                    sbz.append("0");

            if (n2 % 2 == 0 && n2 != 0)
            {
                sb.insert(sb.length() - 1, sbz.toString());
            }
            else {
                sb.append(sbz.toString());
            }
            System.out.println(sb.toString());
        }
    }
}


import java.util.*;

public class MySolution
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n1, n2, n3;

        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            StringBuilder sb = new StringBuilder();
            if (n3 != 0)
                sb.append("1".repeat(Math.max(0, (n2 == 0 ? n3 : n3 - 1) + 1)));

            if (n2 != 0)
                sb.append("1");
            boolean isZero = true;
            for (int j = 0; j < n2; j++) {
                if (isZero) {
                    sb.append("0");
                    isZero = false;
                } else {
                    sb.append("1");
                    isZero = true;
                }
            }
            StringBuilder sbz = new StringBuilder();
            if (n1 != 0)
                sbz.append("0".repeat(Math.max(0, (n2 == 0 ? n1 : n1 - 1) + 1)));

            if (n2 % 2 == 0 && n2 != 0)
            {
                sb.insert(sb.length() - 1, sbz.toString());
            }
            else {
                sb.append(sbz.toString());
            }
            System.out.println(sb.toString());
        }
    }
}


import java.math.BigInteger;
import java.util.*;

import static java.lang.Long.max;
import static java.lang.Long.min;

public class MySolution
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);//new File("rin"));//System.in);
        int n1, n2, n3;

        int t = sc.nextInt();
        for (int i = 0; i < t; i++) {
            n1 = sc.nextInt();
            n2 = sc.nextInt();
            n3 = sc.nextInt();
            StringBuilder sb = new StringBuilder();
            if (n3 != 0)
                sb.append("1".repeat(Math.max(0, (n2 == 0 ? n3 : n3 - 1) + 1)));

            if (n2 != 0)
                sb.append("1");
            boolean isZero = true;
            for (int j = 0; j < n2; j++) {
                if (isZero) {
                    sb.append("0");
                    isZero = false;
                } else {
                    sb.append("1");
                    isZero = true;
                }
            }
            StringBuilder sbz = new StringBuilder();
            if (n1 != 0)
                sbz.append("0".repeat(Math.max(0, (n2 == 0 ? n1 : n1 - 1) + 1)));

            if (n2 % 2 == 0 && n2 != 0)
            {
                sb.insert(sb.length() - 1, sbz.toString());
            }
            else {
                sb.append(sbz.toString());
            }
            System.out.println(sb.toString());
        }
    }
}