import java.io.*;
import java.lang.*;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.util.StringTokenizer;
import java.util.Random;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.util.TreeMap;

public class Rating1500_1352F {
    static InputReader in = new InputReader(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        int t = in.nextInt();
        for(int z = 0; z<t; z++){
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            String ans = "";
            int anscount=0;
            int sum = a+b+c+1;
            if(b==0){
                if(c==0){
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                }
                else{
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                }
            }
            else if(b%2==0){
                if(c==0){
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="0";
                            check = false;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                        else{
                            ans+="1";
                            check = true;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                    }
                }
                else{
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="1";
                            check = false;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                        else{
                            ans+="0";
                            check = true;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                    }
                    for(int i = 0; i<a; i++){
                        ans+="0";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                }
            }
            else{
                if(a==0){
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="1";
                            check = false;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                        else{
                            ans+="0";
                            check = true;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                    }
                }
                else{
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="0";
                            check = false;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                        else{
                            ans+="1";
                            check = true;
                            anscount++;
                            if(anscount>sum){
                                break;
                            }
                        }
                    }
                    for(int i = 0; i<c; i++){
                        ans+="1";
                        anscount++;
                        if(anscount>sum){
                            break;
                        }
                    }
                }
            }
            out.println(ans);
        }
        out.close();
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }
        public long nextLong()
        {
            return Long.parseLong(next());
        }
        public double nextDouble()
        {
            return Double.parseDouble(next());
        }
        public String nextLine()
        {
            try
            {
                return reader.readLine();
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            return null;
        }
        public boolean hasNext()
        {
            String next=null;
            try
            {
                next=reader.readLine();
            }
            catch(Exception e)
            {
            }
            if(next==null)
            {
                return false;
            }
            tokenizer=new StringTokenizer(next);
            return true;
        }
    }
}


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

public class pp1 {
    FastScanner in;
    PrintWriter out;
    class Graph{
        int V;
        ArrayList<Integer> adjlist[];
        Graph(int n){
            this.V = n;
            this.adjlist = new ArrayList[n];
            for(int i=0;i<this.V;i++){
                adjlist[i] = new ArrayList<>();
            }
        }
        void addEdge(int u, int v){
            adjlist[u].add(v);
            adjlist[v].add(u);
        }
        int dfs(int start, int dest, boolean[] vis, List<Integer> happy){
            vis[start]=true;
            int sum=0;
            boolean flag=false;
            for(int i=0;i<adjlist[start].size();i++){
                int b = adjlist[start].get(i);
                if(!vis[b]){
                    flag=true;
                    sum+=dfs(b, dest+1,vis, happy );
                }
            }
            int remain = dest-sum;
            happy.add(remain);
            return sum+1;
        }

    }

    List<Integer> []al;
    boolean [] visited;
    int [] parent;

    void bfs(int src,int dest,List<Integer> [] list){
        Queue<Integer> queue=new LinkedList<>();
        queue.add(src);
        parent[src]=-1;
        visited[src]=true;
        while(!queue.isEmpty()){
            int u=queue.poll();

            for(int v : al[u]){
                if(!visited[v]){
                    queue.add(v);
                    parent[v]=u;
                    visited[v]=true;
                    if(v==dest){
                        break;
                    }
                }
            }
        }
        List<Integer> edge=new ArrayList<>();
        edge.add(dest);
        int k=dest;
        while(parent[k]!=src && parent[k]!=-1){
            k=parent[k];
            edge.add(k);
        }
        edge.add(src);
        for(int i=1;i<edge.size();i++){

            int a=edge.get(i-1);
            int b=edge.get(i);
            list[a].add(b);
        }

    }

    long mod = 1000000007;

    int x = 8000;
    int[] a = new int[x];
    int[] c = new int [x+1];
    void solve() {
        int t = in.nextInt();

        while(t-->0){
            int n0 = in.nextInt();
            int n1 = in.nextInt();
            int n2 =in.nextInt();
            if(n1==0){
                if(n0!=0){
                    for(int i=0;i<n0;i++){
                        out.print(0);///sirf 0
                    }
                    out.println();
                    continue;
                }
                else{
                    for(int i=0;i<n2;i++){
                        out.print(1);//sirf 1
                    }
                    out.println();
                    continue;
                }
            }
            else{
                //mix 01 or 10
                for(int i=0;i<n0;i++){
                    out.print(0);
                }
                out.print("01");
                n1--;
                for(int i=0;i<n2;i++){
                    out.print(1);
                }
                int d=0;
                while(n1!=0){
                    out.print(Integer.toBinaryString(d));
                    d++;
                    n1--;
                }
                out.println();
                continue;
            }
        }

    }

    public static void main(String[] args) {
        new pp1().runIO();
    }

    void run() {
        try {
            in = new FastScanner(new File("A.in"));
            out = new PrintWriter(new File("A.out"));
            solve();
            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

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

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

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

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

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


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

public class pp1 {
    FastScanner in;
    PrintWriter out;
    class Graph{
        int V;
        ArrayList<Integer> adjlist[];
        Graph(int n){
            this.V = n;
            this.adjlist = new ArrayList[n];
            for(int i=0;i<this.V;i++){
                adjlist[i] = new ArrayList<>();
            }
        }
        void addEdge(int u, int v){
            adjlist[u].add(v);
            adjlist[v].add(u);
        }
        int dfs(int start, int dest, boolean[] vis, List<Integer> happy){
            vis[start]=true;
            int sum=0;
            boolean flag=false;
            for(int i=0;i<adjlist[start].size();i++){
                int b = adjlist[start].get(i);
                if(!vis[b]){
                    flag=true;
                    sum+=dfs(b, dest+1,vis, happy );
                }
            }
            int remain = dest-sum;
            happy.add(remain);
            return sum+1;
        }

    }

    List<Integer> []al;
    boolean [] visited;
    int [] parent;

    void bfs(int src,int dest,List<Integer> [] list){
        Queue<Integer> queue=new LinkedList<>();
        queue.add(src);
        parent[src]=-1;
        visited[src]=true;
        while(!queue.isEmpty()){
            int u=queue.poll();

            for(int v : al[u]){
                if(!visited[v]){
                    queue.add(v);
                    parent[v]=u;
                    visited[v]=true;
                    if(v==dest){
                        break;
                    }
                }
            }
        }
        List<Integer> edge=new ArrayList<>();
        edge.add(dest);
        int k=dest;
        while(parent[k]!=src && parent[k]!=-1){
            k=parent[k];
            edge.add(k);
        }
        edge.add(src);
        for(int i=1;i<edge.size();i++){

            int a=edge.get(i-1);
            int b=edge.get(i);
            list[a].add(b);
        }

    }

    long mod = 1000000007;

    int x = 8000;
    int[] a = new int[x];
    int[] c = new int [x+1];
    void solve() {
        int t = in.nextInt();

        while(t-->0){
            int n0 = in.nextInt();
            int n1 = in.nextInt();
            int n2 =in.nextInt();
            if(n1==0){
                if(n0!=0){
                    for(int i=0;i<n0;i++){
                        out.print(0);///sirf 0
                    }
                    out.println();
                    continue;
                }
                else{
                    for(int i=0;i<n2;i++){
                        out.print(1);//sirf 1
                    }
                    out.println();
                    continue;
                }
            }
            else{
                //mix 01 or 10
                for(int i=0;i<n0;i++){
                    out.print(0);
                }
                out.print("01");
                n1--;
                for(int i=0;i<n2;i++){
                    out.print(1);
                }
                int d=0;
                while(n1!=0){
                    out.print(Integer.toBinaryString(d));
                    d=d^1;
                    n1--;
                }
                out.println();
                continue;
            }
        }

    }

    public static void main(String[] args) {
        new pp1().runIO();
    }

    void run() {
        try {
            in = new FastScanner(new File("A.in"));
            out = new PrintWriter(new File("A.out"));
            solve();
            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

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

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

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

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

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


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

public class pp1 {
    FastScanner in;
    PrintWriter out;
    class Graph{
        int V;
        ArrayList<Integer> adjlist[];
        Graph(int n){
            this.V = n;
            this.adjlist = new ArrayList[n];
            for(int i=0;i<this.V;i++){
                adjlist[i] = new ArrayList<>();
            }
        }
        void addEdge(int u, int v){
            adjlist[u].add(v);
            adjlist[v].add(u);
        }
        int dfs(int start, int dest, boolean[] vis, List<Integer> happy){
            vis[start]=true;
            int sum=0;
            boolean flag=false;
            for(int i=0;i<adjlist[start].size();i++){
                int b = adjlist[start].get(i);
                if(!vis[b]){
                    flag=true;
                    sum+=dfs(b, dest+1,vis, happy );
                }
            }
            int remain = dest-sum;
            happy.add(remain);
            return sum+1;
        }

    }

    List<Integer> []al;
    boolean [] visited;
    int [] parent;

    void bfs(int src,int dest,List<Integer> [] list){
        Queue<Integer> queue=new LinkedList<>();
        queue.add(src);
        parent[src]=-1;
        visited[src]=true;
        while(!queue.isEmpty()){
            int u=queue.poll();

            for(int v : al[u]){
                if(!visited[v]){
                    queue.add(v);
                    parent[v]=u;
                    visited[v]=true;
                    if(v==dest){
                        break;
                    }
                }
            }
        }
        List<Integer> edge=new ArrayList<>();
        edge.add(dest);
        int k=dest;
        while(parent[k]!=src && parent[k]!=-1){
            k=parent[k];
            edge.add(k);
        }
        edge.add(src);
        for(int i=1;i<edge.size();i++){

            int a=edge.get(i-1);
            int b=edge.get(i);
            list[a].add(b);
        }

    }

    long mod = 1000000007;

    int x = 8000;
    int[] a = new int[x];
    int[] c = new int [x+1];
    void solve() {
        int t = in.nextInt();

        while(t-->0){
            int n0 = in.nextInt();
            int n1 = in.nextInt();
            int n2 =in.nextInt();
            if(n1==0){
                if(n0!=0){
                    for(int i=0;i<=n0;i++){
                        out.print(0);///sirf 0
                    }
                    out.println();
                    continue;
                }
                else{
                    for(int i=0;i<=n2;i++){
                        out.print(1);//sirf 1
                    }
                    out.println();
                    continue;
                }
            }
            else{
                //mix 01 or 10
                for(int i=0;i<n0;i++){
                    out.print(0);
                }
                out.print("01");
                n1--;
                for(int i=0;i<n2;i++){
                    out.print(1);
                }
                int d=0;
                while(n1!=0){
                    out.print(Integer.toBinaryString(d));
                    d=d^1;
                    n1--;
                }
                out.println();
                continue;
            }
        }

    }

    public static void main(String[] args) {
        new pp1().runIO();
    }

    void run() {
        try {
            in = new FastScanner(new File("A.in"));
            out = new PrintWriter(new File("A.out"));
            solve();
            out.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
    }

    void runIO() {
        in = new FastScanner(System.in);
        out = new PrintWriter(System.out);
        solve();
        out.close();
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        public FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        public FastScanner(InputStream f) {
            br = new BufferedReader(new InputStreamReader(f));
        }

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

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

        boolean hasMoreTokens() {
            while (st == null || !st.hasMoreTokens()) {
                String s = null;
                try {
                    s = br.readLine();
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (s == null)
                    return false;
                st = new StringTokenizer(s);
            }
            return true;
        }

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

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

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


// package name;
import java.io.*;
import java.util.*;

public class Main {
	static final long mod = 1000000007;
	static final long lmx = 9223372036854775807l, lmn = -9223372036854775808l;
	static final int imx = 2147483647, imn = -2147483648;
	static final String Y = "YES", NO = "NO", LN = "\n", SPC = " ";
	static Scanner s = new Scanner(System.in);
	//static Reader s = new Reader();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) throws IOException {
		int t = 1;
		//System.out.println(-1337%3);
		t = s.nextInt();
		String xy = slinp();
		StringBuffer sb = new StringBuffer();
		while (t > 0) {
			t--;
			int n0 = iinp(), n1 = iinp(), n2 = iinp();
			if(n1 == 0) {
				while(n0 > -1) {
					sb.append(0);
					n0--;
				}
				while(n2 > -1) {
					sb.append(1);
					n2--;
				}
			}
			else {
				while(n2 > -1) {
					sb.append(1);
					n2--;
				}
				//sb.append(0);
				while(n0 > -1) {
					sb.append(0);
					n0--;
				}
				int c = 1;
				while(n1 > 1) {
					sb.append(c);
					n1--;
					c ^= 1;
				}
			}
			sb.append(LN);
		}
		out.print(sb);
		out.flush();
	}

	static int iinp() throws IOException {
		return s.nextInt();
	}

	static long linp() throws IOException {
		return s.nextLong();
	}

	static double dinp() throws IOException {
		return s.nextDouble();
	}

	static String sinp() throws IOException {
		return s.next();
	}

	static String slinp() throws IOException {
		return s.nextLine();
	}

	static int[] iarr(int n) {
		return new int[n];
	}

	static long[] larr(int n) {
		return new long[n];
	}

	static double[] darr(int n) {
		return new double[n];
	}

	static boolean[] barr(int n) {
		return new boolean[n];
	}

	static String[] sarr(int n) {
		return new String[n];
	}

	static int[][] iarr(int n, int m) {
		return new int[n][m];
	}

	static long[][] larr(int n, int m) {
		return new long[n][m];
	}

	static int[] iinp(int n, int st, int size) throws IOException {
		int a[] = iarr(n);
		for (int i = st; i < st + size; i++)
			a[i] = iinp();
		return a;
	}

	static long[] linp(int n, int st, int size) throws IOException {
		long a[] = larr(n);
		for (int i = st; i < st + size; i++)
			a[i] = linp();
		return a;
	}

	static String[] sinp(int n, int st, int size, String str) throws IOException {
		String a[] = sarr(n);
		for (int i = st; i < st + size; i++)
			if (str.equalsIgnoreCase(SPC))
				a[i] = sinp();
			else
				a[i] = slinp();
		return a;
	}

	static int[][] iinp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		int a[][] = iarr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = iinp();
		return a;
	}

	static long[][] linp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		long a[][] = larr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = linp();
		return a;
	}

	static void ginp(ArrayList<Integer> g[], int m) throws IOException {
		for (int i = 0; i < m; i++) {
			int u = iinp(), v = iinp();
			g[u].add(u);
			g[v].add(u);
		}
	}

	static long min(long... a) {
		long min = lmx;//Long.MAX_VALUE;
		for (long i : a)
			if (i < min)
				min = i;
		return min;
	}

	static int min(int... a) {
		int min = imx;//Long.MAX_VALUE;
		for (int i : a)
			if (i < min)
				min = i;
		return min;
	}

	static long max(long... a) {
		long max = lmn;//Long.MIN_VALUE;
		for (long i : a)
			if (i > max)
				max = i;
		return max;
	}

	static int max(int... a) {
		int max = imn;//Long.MIN_VALUE;
		for (int i : a)
			if (i > max)
				max = i;
		return max;
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sort(int a[]) {
		Arrays.sort(a);
	};

	static void sort(long a[]) {
		Arrays.sort(a);
	};

	static void sort(String a[]) {
		Arrays.sort(a);
	};

	static void sort(int a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(long a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(String a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sortbycol(int arr[][]) {
		Arrays.sort(arr, new Comparator<int[]>() {
			public int compare(int[] x, int[] y) {
				if (x[1] == y[1])
					return x[2] - y[2];
				return x[1] - y[1]; // sort in increasing order on the basis of first column
			}
		});
	}

	static StringBuffer printarr(long a[], String str) {
		StringBuffer ans = new StringBuffer();
		for (long i : a)
			ans.append(i + str);
		return ans;
	}

}

class Pair implements Comparator<Pair> {
	long a, b;

	Pair(long x, long y) {
		a = x;
		b = y;
	}

	public int compare(Pair p1, Pair p2) {
		if (p1.a != p2.a)
			return (p1.a - p2.a > 0) ? 1 : -1;
		return (p1.b - p2.b > 0) ? 1 : -1;
	}
}


// package name;
import java.io.*;
import java.util.*;

public class Main {
	static final long mod = 1000000007;
	static final long lmx = 9223372036854775807l, lmn = -9223372036854775808l;
	static final int imx = 2147483647, imn = -2147483648;
	static final String Y = "YES", NO = "NO", LN = "\n", SPC = " ";
	static Scanner s = new Scanner(System.in);
	//static Reader s = new Reader();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) throws IOException {
		int t = 1;
		//System.out.println(-1337%3);
		t = s.nextInt();
		String xy = slinp();
		StringBuffer sb = new StringBuffer();
		while (t > 0) {
			t--;
			int n0 = iinp(), n1 = iinp(), n2 = iinp();
			if(n1 == 0) {
				if(n0 > 0)
					while(n0 > -1) {
						sb.append(0);
						n0--;
					}
				if(n2 > 0)
					while(n2 > -1) {
						sb.append(1);
						n2--;
					}
			}
			else {
				while(n2 > -1) {
					sb.append(1);
					n2--;
				}
				//sb.append(0);
				while(n0 > -1) {
					sb.append(0);
					n0--;
				}
				int c = 1;
				while(n1 > 1) {
					sb.append(c);
					n1--;
					c ^= 1;
				}
			}
			sb.append(LN);
		}
		out.print(sb);
		out.flush();
	}

	static int iinp() throws IOException {
		return s.nextInt();
	}

	static long linp() throws IOException {
		return s.nextLong();
	}

	static double dinp() throws IOException {
		return s.nextDouble();
	}

	static String sinp() throws IOException {
		return s.next();
	}

	static String slinp() throws IOException {
		return s.nextLine();
	}

	static int[] iarr(int n) {
		return new int[n];
	}

	static long[] larr(int n) {
		return new long[n];
	}

	static double[] darr(int n) {
		return new double[n];
	}

	static boolean[] barr(int n) {
		return new boolean[n];
	}

	static String[] sarr(int n) {
		return new String[n];
	}

	static int[][] iarr(int n, int m) {
		return new int[n][m];
	}

	static long[][] larr(int n, int m) {
		return new long[n][m];
	}

	static int[] iinp(int n, int st, int size) throws IOException {
		int a[] = iarr(n);
		for (int i = st; i < st + size; i++)
			a[i] = iinp();
		return a;
	}

	static long[] linp(int n, int st, int size) throws IOException {
		long a[] = larr(n);
		for (int i = st; i < st + size; i++)
			a[i] = linp();
		return a;
	}

	static String[] sinp(int n, int st, int size, String str) throws IOException {
		String a[] = sarr(n);
		for (int i = st; i < st + size; i++)
			if (str.equalsIgnoreCase(SPC))
				a[i] = sinp();
			else
				a[i] = slinp();
		return a;
	}

	static int[][] iinp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		int a[][] = iarr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = iinp();
		return a;
	}

	static long[][] linp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		long a[][] = larr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = linp();
		return a;
	}

	static void ginp(ArrayList<Integer> g[], int m) throws IOException {
		for (int i = 0; i < m; i++) {
			int u = iinp(), v = iinp();
			g[u].add(u);
			g[v].add(u);
		}
	}

	static long min(long... a) {
		long min = lmx;//Long.MAX_VALUE;
		for (long i : a)
			if (i < min)
				min = i;
		return min;
	}

	static int min(int... a) {
		int min = imx;//Long.MAX_VALUE;
		for (int i : a)
			if (i < min)
				min = i;
		return min;
	}

	static long max(long... a) {
		long max = lmn;//Long.MIN_VALUE;
		for (long i : a)
			if (i > max)
				max = i;
		return max;
	}

	static int max(int... a) {
		int max = imn;//Long.MIN_VALUE;
		for (int i : a)
			if (i > max)
				max = i;
		return max;
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sort(int a[]) {
		Arrays.sort(a);
	};

	static void sort(long a[]) {
		Arrays.sort(a);
	};

	static void sort(String a[]) {
		Arrays.sort(a);
	};

	static void sort(int a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(long a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(String a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sortbycol(int arr[][]) {
		Arrays.sort(arr, new Comparator<int[]>() {
			public int compare(int[] x, int[] y) {
				if (x[1] == y[1])
					return x[2] - y[2];
				return x[1] - y[1]; // sort in increasing order on the basis of first column
			}
		});
	}

	static StringBuffer printarr(long a[], String str) {
		StringBuffer ans = new StringBuffer();
		for (long i : a)
			ans.append(i + str);
		return ans;
	}

}

class Pair implements Comparator<Pair> {
	long a, b;

	Pair(long x, long y) {
		a = x;
		b = y;
	}

	public int compare(Pair p1, Pair p2) {
		if (p1.a != p2.a)
			return (p1.a - p2.a > 0) ? 1 : -1;
		return (p1.b - p2.b > 0) ? 1 : -1;
	}
}


// package name;
import java.io.*;
import java.util.*;

public class Main {
	static final long mod = 1000000007;
	static final long lmx = 9223372036854775807l, lmn = -9223372036854775808l;
	static final int imx = 2147483647, imn = -2147483648;
	static final String Y = "YES", NO = "NO", LN = "\n", SPC = " ";
	static Scanner s = new Scanner(System.in);
	//static Reader s = new Reader();
	static PrintWriter out = new PrintWriter(System.out);

	public static void main(String[] args) throws IOException {
		int t = 1;
		//System.out.println(-1337%3);
		t = s.nextInt();
		String xy = slinp();
		StringBuffer sb = new StringBuffer();
		while (t > 0) {
			t--;
			int n0 = iinp(), n1 = iinp(), n2 = iinp();
			if(n1 == 0) {
				while(n0 > -1) {
					sb.append(0);
					n0--;
				}
				if(n2 > 0)
					while(n2 > -1) {
						sb.append(1);
						n2--;
					}
			}
			else {
				while(n2 > -1) {
					sb.append(1);
					n2--;
				}
				//sb.append(0);
				while(n0 > -1) {
					sb.append(0);
					n0--;
				}
				int c = 1;
				while(n1 > 1) {
					sb.append(c);
					n1--;
					c ^= 1;
				}
			}
			sb.append(LN);
		}
		out.print(sb);
		out.flush();
	}

	static int iinp() throws IOException {
		return s.nextInt();
	}

	static long linp() throws IOException {
		return s.nextLong();
	}

	static double dinp() throws IOException {
		return s.nextDouble();
	}

	static String sinp() throws IOException {
		return s.next();
	}

	static String slinp() throws IOException {
		return s.nextLine();
	}

	static int[] iarr(int n) {
		return new int[n];
	}

	static long[] larr(int n) {
		return new long[n];
	}

	static double[] darr(int n) {
		return new double[n];
	}

	static boolean[] barr(int n) {
		return new boolean[n];
	}

	static String[] sarr(int n) {
		return new String[n];
	}

	static int[][] iarr(int n, int m) {
		return new int[n][m];
	}

	static long[][] larr(int n, int m) {
		return new long[n][m];
	}

	static int[] iinp(int n, int st, int size) throws IOException {
		int a[] = iarr(n);
		for (int i = st; i < st + size; i++)
			a[i] = iinp();
		return a;
	}

	static long[] linp(int n, int st, int size) throws IOException {
		long a[] = larr(n);
		for (int i = st; i < st + size; i++)
			a[i] = linp();
		return a;
	}

	static String[] sinp(int n, int st, int size, String str) throws IOException {
		String a[] = sarr(n);
		for (int i = st; i < st + size; i++)
			if (str.equalsIgnoreCase(SPC))
				a[i] = sinp();
			else
				a[i] = slinp();
		return a;
	}

	static int[][] iinp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		int a[][] = iarr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = iinp();
		return a;
	}

	static long[][] linp(int n, int m, int row, int rows, int col, int cols) throws IOException {
		long a[][] = larr(n, m);
		for (int i = row; i < row + rows; i++)
			for (int j = col; j < col + cols; j++)
				a[i][j] = linp();
		return a;
	}

	static void ginp(ArrayList<Integer> g[], int m) throws IOException {
		for (int i = 0; i < m; i++) {
			int u = iinp(), v = iinp();
			g[u].add(u);
			g[v].add(u);
		}
	}

	static long min(long... a) {
		long min = lmx;//Long.MAX_VALUE;
		for (long i : a)
			if (i < min)
				min = i;
		return min;
	}

	static int min(int... a) {
		int min = imx;//Long.MAX_VALUE;
		for (int i : a)
			if (i < min)
				min = i;
		return min;
	}

	static long max(long... a) {
		long max = lmn;//Long.MIN_VALUE;
		for (long i : a)
			if (i > max)
				max = i;
		return max;
	}

	static int max(int... a) {
		int max = imn;//Long.MIN_VALUE;
		for (int i : a)
			if (i > max)
				max = i;
		return max;
	}

	static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	static void sort(int a[]) {
		Arrays.sort(a);
	};

	static void sort(long a[]) {
		Arrays.sort(a);
	};

	static void sort(String a[]) {
		Arrays.sort(a);
	};

	static void sort(int a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(long a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sort(String a[], int st, int e) {
		Arrays.sort(a, st, e);
	};

	static void sortbycol(int arr[][]) {
		Arrays.sort(arr, new Comparator<int[]>() {
			public int compare(int[] x, int[] y) {
				if (x[1] == y[1])
					return x[2] - y[2];
				return x[1] - y[1]; // sort in increasing order on the basis of first column
			}
		});
	}

	static StringBuffer printarr(long a[], String str) {
		StringBuffer ans = new StringBuffer();
		for (long i : a)
			ans.append(i + str);
		return ans;
	}

}

class Pair implements Comparator<Pair> {
	long a, b;

	Pair(long x, long y) {
		a = x;
		b = y;
	}

	public int compare(Pair p1, Pair p2) {
		if (p1.a != p2.a)
			return (p1.a - p2.a > 0) ? 1 : -1;
		return (p1.b - p2.b > 0) ? 1 : -1;
	}
}


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

public class q6 {

	public static void main(String[] args) {
        FastReader s = new FastReader();

		int t = s.nextInt();

		while(t-- > 0)
		{
			int n0 = s.nextInt();
			int n1 = s.nextInt();
			int n2 = s.nextInt();

			if(n1==0 && n2==0)
				for(int i=0;i<=n0;++i)
					System.out.print("0");
			else if(n1==0 && n0==0)
				for(int i=0;i<=n2;++i)
					System.out.print("1");
			else if(n0==0 && n2==0)
			{
				if(n1%2==0)
				{
					for(int i=0;i<n1/2;++i)
						System.out.print("01");
					System.out.print("0");
				}
				else
				{
					for(int i=0;i< n1/2 + 1;++i)
						System.out.print("01");
				}
			}
			else{
				StringBuilder ans = new StringBuilder();
				for(int i=0;i<=n0;++i)
					ans.append("0");

				ans.append("1");

				if(n1%2==0)
				{
					for(int i=0;i<n1-2;i+=2)
						{
							ans.append("0");
							ans.append("1");
						}
				}
				else
				{
					for(int i=0;i<n1-1;i+=2)
					{
						ans.append("0");
						ans.append("1");
					}
				}

				for(int i=0;i<n2;++i)
					ans.append("1");

				if(n1%2==0)
					ans.append("0");

				System.out.print(ans);
			}
			System.out.println();

		}

	}

	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.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class q6 {

	public static void main(String[] args) {
        FastReader s = new FastReader();

		int t = s.nextInt();

		while(t-- > 0)
		{
			int n0 = s.nextInt();
			int n1 = s.nextInt();
			int n2 = s.nextInt();

			StringBuilder ans = new StringBuilder();
			for(int i=0;n0!=0 && i<=n0;++i)
				ans.append("0");
			if(n0==0 && n2==0)
				ans.append("0");
			if(n1!=0)
				ans.append("1");
			if(n1%2==0)
			{
				for(int i=0;i<n1-2;i+=2)
					{
						ans.append("0");
						ans.append("1");
					}
			}
			else
			{
				for(int i=0;i<n1-1;i+=2)
				{
					ans.append("0");
					ans.append("1");
				}
			}

			for(int i=0;i<n2;++i)
				ans.append("1");
			if(n1==0 && n0==0)
				ans.append("1");
			if(n1!=0 && n1%2==0)
				ans.append("0");

			System.out.println(ans);
		}

	}

	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.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class q6 {

	public static void main(String[] args) {
        FastReader s = new FastReader();

		int t = s.nextInt();

		while(t-- > 0)
		{
			int n0 = s.nextInt();
			int n1 = s.nextInt();
			int n2 = s.nextInt();

			StringBuilder ans = new StringBuilder();
			for(int i=0;n0!=0 && i<=n0;++i)
				ans.append("0");
			if(n0==0 && n2==0)
				ans.append("0");
			if(n0==0)
				ans.append("0");
			if(n1!=0)
				ans.append("1");
			if(n1%2==0)
			{
				for(int i=0;i<n1-2;i+=2)
					{
						ans.append("0");
						ans.append("1");
					}
			}
			else
			{
				for(int i=0;i<n1-1;i+=2)
				{
					ans.append("0");
					ans.append("1");
				}
			}

			for(int i=0;i<n2;++i)
				ans.append("1");
			if(n1==0 && n0==0)
				ans.append("1");
			if(n1!=0 && n1%2==0)
				ans.append("0");

			System.out.println(ans);
		}

	}

	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.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class q6 {

	public static void main(String[] args) {
        FastReader s = new FastReader();

		int t = s.nextInt();

		while(t-- > 0)
		{
			int n0 = s.nextInt();
			int n1 = s.nextInt();
			int n2 = s.nextInt();

			StringBuilder ans = new StringBuilder();
			for(int i=0;n0!=0 && i<=n0;++i)
				ans.append("0");
			if(n1!=0)
				ans.append("1");
			if(n1%2==0)
			{
				for(int i=0;i<n1-2;i+=2)
					{
						ans.append("0");
						ans.append("1");
					}
			}
			else
			{
				for(int i=0;i<n1-1;i+=2)
				{
					ans.append("0");
					ans.append("1");
				}
			}

			for(int i=0;i<n2;++i)
				ans.append("1");
			if(n1==0 && n0==0)
				ans.append("1");
			if(n1!=0 && n1%2==0)
				ans.append("0");

			System.out.println(ans);
		}

	}

	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.util.*;
import java.io.*;

/**
 * Made by egor https://github.com/chermehdi/egor.
 *
 * @author Azuz
 *
 */
public class Main {

    void solve(Scanner in, PrintWriter out) {
      int t = in.nextInt();
      while (t-->0) {
        int n0 = in.nextInt();
        int n1 = in.nextInt();
        int n2 = in.nextInt();

        int a = n0, b = n1, c = n2;

        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n0; ++i) {
          if (i == 0) sb.append(0);
          sb.append(0);
        }

        for (int i = 0; i < n2; ++i) {
          if (i == 0) sb.append(1);
          sb.append(1);
        }

        int cur = 1;
        if (n2 > 0) {
          --n1;
          cur = 0;
        }

        for (int i = 0; i < n1; ++i) {
          if (i == 0 && cur == 1) {
            sb.append(cur++);
            cur %= 2;
          }
          sb.append(cur++);
          cur %= 2;
        }

        for (int i = 1; i < sb.length(); ++i) {
          if (sb.charAt(i) == '0' && sb.charAt(i - 1) == '0') {
            --a;
          } else if (sb.charAt(i) == '1' && sb.charAt(i - 1) == '1') {
            --b;
          } else {
            --c;
          }
        }

        if (a + b + c != 0) {
          throw new RuntimeException(a + " " + b + " " + c);
        }

        out.println(sb.toString());
      }
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}


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

/**
 * Made by egor https://github.com/chermehdi/egor.
 *
 * @author Azuz
 *
 */
public class Main {

    void solve(Scanner in, PrintWriter out) {
      int t = in.nextInt();
      while (t-->0) {
        int n0 = in.nextInt();
        int n1 = in.nextInt();
        int n2 = in.nextInt();
        boolean has = false;
        int cur = 1;
        if (n0 > 0) out.print(0);
        for (int i = 0; i < n0; ++i) {
          out.print(0);
          cur = 1;
          has = true;
        }
        if (n2 > 0) {
          out.print(1);
          --n1;
        }
        for (int i = 0; i < n2; ++i) {
          out.print(1);
          cur = 0;
          has = true;
        }

        if (!has) {
          out.print(cur++);
          cur %= 2;
        }
        for (int i = 0; i < n1; ++i) {
          out.print(cur++);
          cur %= 2;
        }

        out.println();
      }
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}


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

/**
 * Made by egor https://github.com/chermehdi/egor.
 *
 * @author Azuz
 *
 */
public class Main {

    void solve(Scanner in, PrintWriter out) {
      int t = in.nextInt();
      while (t-->0) {
        int n0 = in.nextInt();
        int n1 = in.nextInt();
        int n2 = in.nextInt();

        StringBuilder sb = new StringBuilder();
        int cur = 0;
        if (n1 > 0) {
          sb.append(1);
        }
        for (int i = 0; i < n1; ++i) {
          sb.append(cur++);
          cur %= 2;
        }

        char[] arr = sb.toString().toCharArray();

        if (n1 == 0) {
          if (n0 > 0) out.print(0);
           while (n0--> 0) {
              out.print(0);
           }
           if (n2 > 0) out.print(1);
           while (n2--> 0) {
              out.print(1);
            }
        } else
        for (char c: arr) {
          out.print(c);
          if (c == '0') {
            while (n0--> 0) {
              out.print(0);
            }
          } else {
            while (n2-->0) {
              out.print(1);
            }
          }
        }

        out.println();
      }
    }

    public static void main(String[] args) {
        try(Scanner in = new Scanner(System.in);
            PrintWriter out = new PrintWriter(System.out)) {
            new Main().solve(in, out);
        }
    }
}


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){

                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);
                }
                int v = 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();
            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 if(f[0]>0){
                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();
            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 if(f[0]>0){
                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);
            }else{
                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();
    }
}