import java.io.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;
import java.lang.management.*;
import static java.lang.Math.*;

@SuppressWarnings("unchecked")
public class P1352F {

  boolean check(int [] a, int [] n) {
    for (int i = n[0] + n[1] + n[2] - 1; i >= 0; n[a[i] + a[i + 1]]--, i--);
    return ((n[0] | n[1] | n[2]) == 0);
  }

  public void run() throws Exception {
    for (int t = nextInt(); t > 0; t--) {
      int n0 = nextInt(), n1 = nextInt(), n2 = nextInt(), n = n0 + n1 + n2 + 1, a0 [] = new int [n], a1 [] = new int [n];

      if ((n1 == 0) && (n2 == 0)) {
        for (int i = 0; i < n; print("0"), i++);
        println();
        continue;
      }

      if ((n1 == 0) && (n0 == 0)) {
        for (int i = 0; i < n; print("1"), i++);
        println();
        continue;
      }

      for (int i = n - n2; i < n; a1[i] = 1, a0[i] = 1, i++);

      for (int i = n0, v = 0; i < (n - n2); a0[i] = v, v ^= 1, i++);
      for (int i = n0, v = 1; i < (n - n2); a1[i] = v, v ^= 1, i++);

      if (check(a0, new int [] { n0, n1, n2 })) {
        for (int i = 0; i < n; print(a0[i]), i++);
      } else {
        for (int i = 0; i < n; print(a1[i]), i++);
      }

      println();
    }
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P1352F().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
    long gct = 0, gcc = 0;
    for (GarbageCollectorMXBean garbageCollectorMXBean : ManagementFactory.getGarbageCollectorMXBeans()) {
      gct += garbageCollectorMXBean.getCollectionTime();
      gcc += garbageCollectorMXBean.getCollectionCount();
    }
    System.err.println("[GC time : " + gct + " ms, count = " + gcc + "]");
    System.err.println("[JIT time : " + ManagementFactory.getCompilationMXBean().getTotalCompilationTime() + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void printsp(int [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void printsp(long [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Integer.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Integer.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  long gcd(long a, long b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Long.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Long.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  boolean isPrime(int v) {
    if (v <= 1) { return false; }
    if (v <= 3) { return true; }
    if (((v & 1) == 0) || ((v % 3) == 0)) { return false; }
    for (int m = 5, n = (int)sqrt(v); m <= n; m += 6) { if (((v % m) == 0) || ((v % (m + 2)) == 0)) { return false; } }
    return true;
  }

  int [] rshuffle(int [] a) { // RANDOM shuffle
    Random r = new Random();
    for (int i = a.length - 1, j, t; i >= 0; j = r.nextInt(a.length), t = a[i], a[i] = a[j], a[j] = t, i--);
    return a;
  }

  int [] qshuffle(int [] a) { // QUICK shuffle
    int m = new Random().nextInt(10) + 2;
    for (int i = 0, n = a.length, j = m % n, t; i < n; t = a[i], a[i] = a[j], a[j] = t, i++, j = (i * m) % n);
    return a;
  }

  long [] shuffle(long [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      long t = a[i]; a[i] = a[j]; a[j] = t;
    }
    return a;
  }

  void shuffle(Object [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      Object t = a[i]; a[i] = a[j]; a[j] = t;
    }
  }

  int [] sort(int [] a) {
    final int SHIFT = 16, MASK = (1 << SHIFT) - 1, SIZE = (1 << SHIFT) + 1;
    int n = a.length, ta [] = new int [n], ai [] = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] & MASK) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] & MASK]++] = a[i], i++);
    int [] t = a; a = ta; ta = t;
    ai = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] >> SHIFT) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] >> SHIFT]++] = a[i], i++);
    return ta;
  }

  void flush() {
    pw.flush();
  }

  void pause() {
    flush(); System.console().readLine();
  }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;
import java.lang.management.*;
import static java.lang.Math.*;

@SuppressWarnings("unchecked")
public class P1352F {

  boolean check(int [] a, int [] n) {
    for (int i = n[0] + n[1] + n[2]; i <= 0; n[a[i] + a[i - 1]]--, i--);
    return ((n[0] | n[1] | n[2]) == 0);
  }

  public void run() throws Exception {
    for (int t = nextInt(); t > 0; t--) {
      int n0 = nextInt(), n1 = nextInt(), n2 = nextInt(), n = n0 + n1 + n2 + 1, a0 [] = new int [n], a1 [] = new int [n];

      if ((n1 == 0) && (n2 == 0)) {
        for (int i = 0; i < n; print("0"), i++);
        println();
        continue;
      }

      if ((n1 == 0) && (n0 == 0)) {
        for (int i = 0; i < n; print("1"), i++);
        println();
        continue;
      }

      for (int i = n - n2; i < n; a1[i] = 1, a0[i] = 1, i++);

      for (int i = n0, v = 0; i < (n - n2); a0[i] = v, v ^= 1, i++);
      for (int i = n0, v = 1; i < (n - n2); a1[i] = v, v ^= 1, i++);

      if (check(a0, new int [] { n0, n1, n2 })) {
        for (int i = 0; i < n; print(a0[i]), i++);
      } else {
        for (int i = 0; i < n; print(a1[i]), i++);
      }

      println();
    }
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P1352F().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
    long gct = 0, gcc = 0;
    for (GarbageCollectorMXBean garbageCollectorMXBean : ManagementFactory.getGarbageCollectorMXBeans()) {
      gct += garbageCollectorMXBean.getCollectionTime();
      gcc += garbageCollectorMXBean.getCollectionCount();
    }
    System.err.println("[GC time : " + gct + " ms, count = " + gcc + "]");
    System.err.println("[JIT time : " + ManagementFactory.getCompilationMXBean().getTotalCompilationTime() + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void printsp(int [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void printsp(long [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Integer.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Integer.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  long gcd(long a, long b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Long.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Long.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  boolean isPrime(int v) {
    if (v <= 1) { return false; }
    if (v <= 3) { return true; }
    if (((v & 1) == 0) || ((v % 3) == 0)) { return false; }
    for (int m = 5, n = (int)sqrt(v); m <= n; m += 6) { if (((v % m) == 0) || ((v % (m + 2)) == 0)) { return false; } }
    return true;
  }

  int [] rshuffle(int [] a) { // RANDOM shuffle
    Random r = new Random();
    for (int i = a.length - 1, j, t; i >= 0; j = r.nextInt(a.length), t = a[i], a[i] = a[j], a[j] = t, i--);
    return a;
  }

  int [] qshuffle(int [] a) { // QUICK shuffle
    int m = new Random().nextInt(10) + 2;
    for (int i = 0, n = a.length, j = m % n, t; i < n; t = a[i], a[i] = a[j], a[j] = t, i++, j = (i * m) % n);
    return a;
  }

  long [] shuffle(long [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      long t = a[i]; a[i] = a[j]; a[j] = t;
    }
    return a;
  }

  void shuffle(Object [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      Object t = a[i]; a[i] = a[j]; a[j] = t;
    }
  }

  int [] sort(int [] a) {
    final int SHIFT = 16, MASK = (1 << SHIFT) - 1, SIZE = (1 << SHIFT) + 1;
    int n = a.length, ta [] = new int [n], ai [] = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] & MASK) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] & MASK]++] = a[i], i++);
    int [] t = a; a = ta; ta = t;
    ai = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] >> SHIFT) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] >> SHIFT]++] = a[i], i++);
    return ta;
  }

  void flush() {
    pw.flush();
  }

  void pause() {
    flush(); System.console().readLine();
  }
}


import java.io.*;
import java.math.*;
import java.util.*;
import java.util.stream.*;
import java.lang.management.*;
import static java.lang.Math.*;

@SuppressWarnings("unchecked")
public class P1352F {

  public void run() throws Exception {
    for (int t = nextInt(); t > 0; t--) {
      int n0 = nextInt(), n1 = nextInt(), n2 = nextInt(), n = n0 + n1 + n2 + 1, a [] = new int [n];

      if (n1 == 0) {
        if (n0 == 0) {
          Arrays.fill(a, 1);
        }
      } else {
        int ai = 0;
        for (; ai < n2 + 1; a[ai] = 1, ai++);
        ai += n0 + 1;
        for (int v = 1; ai < n; a[ai] = v, v ^= 1, ai++);
      }

      IntStream.of(a).forEach(this::print);
      println();
    }
  }

  public static void main(String... args) throws Exception {
    br = new BufferedReader(new InputStreamReader(System.in));
    pw = new PrintWriter(new BufferedOutputStream(System.out));
    new P1352F().run();
    br.close();
    pw.close();
    System.err.println("\n[Time : " + (System.currentTimeMillis() - startTime) + " ms]");
    long gct = 0, gcc = 0;
    for (GarbageCollectorMXBean garbageCollectorMXBean : ManagementFactory.getGarbageCollectorMXBeans()) {
      gct += garbageCollectorMXBean.getCollectionTime();
      gcc += garbageCollectorMXBean.getCollectionCount();
    }
    System.err.println("[GC time : " + gct + " ms, count = " + gcc + "]");
    System.err.println("[JIT time : " + ManagementFactory.getCompilationMXBean().getTotalCompilationTime() + " ms]");
  }

  static long startTime = System.currentTimeMillis();
  static BufferedReader br;
  static PrintWriter pw;
  StringTokenizer stok;

  String nextToken() throws IOException {
    while (stok == null || !stok.hasMoreTokens()) {
      String s = br.readLine();
      if (s == null) { return null; }
      stok = new StringTokenizer(s);
    }
    return stok.nextToken();
  }

  void print(byte b) { print("" + b); }
  void print(int i) { print("" + i); }
  void print(long l) { print("" + l); }
  void print(double d) { print("" + d); }
  void print(char c) { print("" + c); }
  void print(Object o) {
    if (o instanceof int[]) { print(Arrays.toString((int [])o));
    } else if (o instanceof long[]) { print(Arrays.toString((long [])o));
    } else if (o instanceof char[]) { print(Arrays.toString((char [])o));
    } else if (o instanceof byte[]) { print(Arrays.toString((byte [])o));
    } else if (o instanceof short[]) { print(Arrays.toString((short [])o));
    } else if (o instanceof boolean[]) { print(Arrays.toString((boolean [])o));
    } else if (o instanceof float[]) { print(Arrays.toString((float [])o));
    } else if (o instanceof double[]) { print(Arrays.toString((double [])o));
    } else if (o instanceof Object[]) { print(Arrays.toString((Object [])o));
    } else { print("" + o); }
  }
  void printsp(int [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void printsp(long [] a) { for (int i = 0, n = a.length; i < n; print(a[i] + " "), i++); }
  void print(String s) { pw.print(s); }
  void println() { println(""); }
  void println(byte b) { println("" + b); }
  void println(int i) { println("" + i); }
  void println(long l) { println("" + l); }
  void println(double d) { println("" + d); }
  void println(char c) { println("" + c); }
  void println(Object o) { print(o); println(); }
  void println(String s) { pw.println(s); }
  int nextInt() throws IOException { return Integer.parseInt(nextToken()); }
  long nextLong() throws IOException { return Long.parseLong(nextToken()); }
  double nextDouble() throws IOException { return Double.parseDouble(nextToken()); }
  char nextChar() throws IOException { return (char) (br.read()); }
  String next() throws IOException { return nextToken(); }
  String nextLine() throws IOException { return br.readLine(); }
  int [] readInt(int size) throws IOException {
    int [] array = new int [size];
    for (int i = 0; i < size; i++) { array[i] = nextInt(); }
    return array;
  }
  long [] readLong(int size) throws IOException {
    long [] array = new long [size];
    for (int i = 0; i < size; i++) { array[i] = nextLong(); }
    return array;
  }
  double [] readDouble(int size) throws IOException {
    double [] array = new double [size];
    for (int i = 0; i < size; i++) { array[i] = nextDouble(); }
    return array;
  }
  String [] readLines(int size) throws IOException {
    String [] array = new String [size];
    for (int i = 0; i < size; i++) { array[i] = nextLine(); }
    return array;
  }

  int gcd(int a, int b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Integer.numberOfTrailingZeros(a), bz = Integer.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Integer.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Integer.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  long gcd(long a, long b) {
    if (a == 0) return Math.abs(b); if (b == 0) return Math.abs(a);
    a = Math.abs(a); b = Math.abs(b);
    int az = Long.numberOfTrailingZeros(a), bz = Long.numberOfTrailingZeros(b);
    a >>>= az; b >>>= bz;
    while (a != b) {
      if (a > b) { a -= b; a >>>= Long.numberOfTrailingZeros(a); }
            else { b -= a; b >>>= Long.numberOfTrailingZeros(b); }
    }
    return (a << Math.min(az, bz));
  }

  boolean isPrime(int v) {
    if (v <= 1) { return false; }
    if (v <= 3) { return true; }
    if (((v & 1) == 0) || ((v % 3) == 0)) { return false; }
    for (int m = 5, n = (int)sqrt(v); m <= n; m += 6) { if (((v % m) == 0) || ((v % (m + 2)) == 0)) { return false; } }
    return true;
  }

  int [] rshuffle(int [] a) { // RANDOM shuffle
    Random r = new Random();
    for (int i = a.length - 1, j, t; i >= 0; j = r.nextInt(a.length), t = a[i], a[i] = a[j], a[j] = t, i--);
    return a;
  }

  int [] qshuffle(int [] a) { // QUICK shuffle
    int m = new Random().nextInt(10) + 2;
    for (int i = 0, n = a.length, j = m % n, t; i < n; t = a[i], a[i] = a[j], a[j] = t, i++, j = (i * m) % n);
    return a;
  }

  long [] shuffle(long [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      long t = a[i]; a[i] = a[j]; a[j] = t;
    }
    return a;
  }

  void shuffle(Object [] a) {
    Random r = new Random();
    for (int i = a.length - 1; i >= 0; i--) {
      int j = r.nextInt(a.length);
      Object t = a[i]; a[i] = a[j]; a[j] = t;
    }
  }

  int [] sort(int [] a) {
    final int SHIFT = 16, MASK = (1 << SHIFT) - 1, SIZE = (1 << SHIFT) + 1;
    int n = a.length, ta [] = new int [n], ai [] = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] & MASK) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] & MASK]++] = a[i], i++);
    int [] t = a; a = ta; ta = t;
    ai = new int [SIZE];
    for (int i = 0; i < n; ai[(a[i] >> SHIFT) + 1]++, i++);
    for (int i = 1; i < SIZE; ai[i] += ai[i - 1], i++);
    for (int i = 0; i < n; ta[ai[a[i] >> SHIFT]++] = a[i], i++);
    return ta;
  }

  void flush() {
    pw.flush();
  }

  void pause() {
    flush(); System.console().readLine();
  }
}


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

public class F {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int t = Integer.parseInt(st.nextToken());
		while (t-- > 0) {
			st = new StringTokenizer(br.readLine());
			int zero = Integer.parseInt(st.nextToken());
			int one = Integer.parseInt(st.nextToken());
			int two = Integer.parseInt(st.nextToken());
			StringBuilder zs = new StringBuilder();
			StringBuilder os = new StringBuilder();
			StringBuilder ts = new StringBuilder();
			for (int i = 0; i <= zero; i++) {
				zs.append('0');
			}
			for (int i = 0; i <= two; i++) {
				ts.append('1');
			}
			if (zero == 0 && one == 0) {
				System.out.println(ts);
				continue;
			}
			if (two == 0 && one == 0) {
				System.out.println(zs);
				continue;
			}
			if (zero == 0 && two == 0) {
				os.append("01");
				for (int i = 0; i < one - 1; i++) {
					os.append(i % 2);
				}
				System.out.println(os);
				continue;
			}
			if (zero == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					ts.append('0');
				}
				System.out.println(os.toString() + ts.toString());
				continue;
			}
			if (two == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					System.out.println('1' + zs.toString() + os.toString());
				} else {
					System.out.println(zs.toString() + os.toString());
				}
				continue;
			}
			if (one % 2 == 0) {
				ts.append('0');
			}
			for (int i = 0; i < (one >> 1); i++) {
				os.append("10");
			}
			System.out.println(zs.toString() + os.toString() + ts.toString());
		}
	}
}


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

public class F {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int t = Integer.parseInt(st.nextToken());
		while (t-- > 0) {
			st = new StringTokenizer(br.readLine());
			int zero = Integer.parseInt(st.nextToken());
			int one = Integer.parseInt(st.nextToken());
			int two = Integer.parseInt(st.nextToken());
			StringBuilder zs = new StringBuilder();
			StringBuilder os = new StringBuilder();
			StringBuilder ts = new StringBuilder();
			for (int i = 0; i <= zero; i++) {
				zs.append('0');
			}
			for (int i = 0; i <= two; i++) {
				ts.append('1');
			}
			if (zero == 0 && one == 0) {
				System.out.println(ts);
				continue;
			}
			if (two == 0 && one == 0) {
				System.out.println(zs);
				continue;
			}
			if (zero == 0 && two == 0) {
				for (int i = 0; i < one; i++) {
					os.append("01");
				}
				System.out.println(os);
				continue;
			}
			if (one % 2 == 0) {
				ts.append('0');
			}
			for (int i = 0; i < (one >> 1); i++) {
				os.append("10");
			}
			System.out.println(zs.toString() + os.toString() + ts.toString());
		}
	}
}


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

public class F {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int t = Integer.parseInt(st.nextToken());
		while (t-- > 0) {
			st = new StringTokenizer(br.readLine());
			int zero = Integer.parseInt(st.nextToken());
			int one = Integer.parseInt(st.nextToken());
			int two = Integer.parseInt(st.nextToken());
			StringBuilder zs = new StringBuilder();
			StringBuilder os = new StringBuilder();
			StringBuilder ts = new StringBuilder();
			for (int i = 0; i <= zero; i++) {
				zs.append('0');
			}
			for (int i = 0; i <= two; i++) {
				ts.append('1');
			}
			if (zero == 0 && one == 0) {
				System.out.println(ts);
				continue;
			}
			if (two == 0 && one == 0) {
				System.out.println(zs);
				continue;
			}
			if (zero == 0 && two == 0) {
				os.append("01");
				for (int i = 0; i < one - 1; i++) {
					os.append(i % 2);
				}
				System.out.println(os);
				continue;
			}
			if (zero == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					ts.append('0');
				}
				System.out.println(os.toString() + ts.toString());
				continue;
			}
			if (two == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					System.out.println('1' + zs.toString() + os.toString());
				} else {
					System.out.println(zs.toString() + os.toString());
				}
				continue;
			}
			if (one % 2 == 0) {
				ts.append('0');
				one--;
			}
			for (int i = 0; i < (one >> 1); i++) {
				os.append("10");
			}
			System.out.println(zs.toString() + os.toString() + ts.toString());
		}
	}
}


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

public class F {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int t = Integer.parseInt(st.nextToken());
		while (t-- > 0) {
			st = new StringTokenizer(br.readLine());
			int zero = Integer.parseInt(st.nextToken());
			int one = Integer.parseInt(st.nextToken());
			int two = Integer.parseInt(st.nextToken());
			StringBuilder zs = new StringBuilder();
			StringBuilder os = new StringBuilder();
			StringBuilder ts = new StringBuilder();
			for (int i = 0; i <= zero; i++) {
				zs.append('0');
			}
			for (int i = 0; i <= two; i++) {
				ts.append('1');
			}
			if (zero == 0 && one == 0) {
				System.out.println(ts);
				continue;
			}
			if (two == 0 && one == 0) {
				System.out.println(zs);
				continue;
			}
			if (zero == 0 && two == 0) {
				os.append("01");
				for (int i = 0; i < one - 1; i++) {
					os.append(i % 2);
				}
				System.out.println(os);
				continue;
			}
			if (zero == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					ts.append('0');
				}
				System.out.println(os.toString() + ts.toString());
				continue;
			}
			if (two == 0) {
				int i = 0;
				for (i = 0; i < (one >> 1); i++) {
					os.append("10");
				}
				if (one != i * 2) {
					System.out.println('1' + zs.toString() + os.toString());
				} else {
					System.out.println(zs.toString() + os.toString());
				}
			}
		}
	}
}


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

public class Binary_S_Reconst {
    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 (Exception e) {

                    e.printStackTrace();
                }

            }
            return st.nextToken();
        }

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    public static void main(String[] args) {
       FastReader in = new FastReader();
       int t = in.nextInt();
       while(t-- > 0){
           int n0 = in.nextInt();
           int n1 = in.nextInt();
           int n2 = in.nextInt();

           String res = "";

           if( n0 == 0 && n1 == 0 && n2 > 0){
               for(int i = 0; i <=n2; i++){
                   res += '1';
               }
           }else if(n0 == 0 && n1 > 0 && n2 == 0){
               int y = 1;
               for(int i = 0; i <= n1; i++){
                   res += y;
                   y = 1 - y;
               }
           }else if(n0 > 0 && n1 == 0 && n2 == 0){
               for(int i = 0; i <=n0; i++){
                   res += '0';
               }
           }else if(n0 == 0 && n1 > 0 && n2 > 0){
               for(int i = 0; i <=n2; i++){
                   res += '1';
               }
               res += '0';
               n1--;
               int s = 1;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }
           }else if(n0 > 0 && n1 > 0 && n2 == 0){
               for(int i = 0; i <=n0; i++){
                   res += '0';
               }
               res += '1';
               n1--;
               int s = 1;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }

           }else{
               for (int i = 0; i <= n2; i++) {
                   res += '1';
               }
               for (int i = 0; i <= n0; i++) {
                   res += '0';
               }
               n1--;
               int s = 1;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }

           }

           System.out.println(res);
       }
    }
}


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

public class Binary_S_Reconst {
    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 (Exception e) {

                    e.printStackTrace();
                }

            }
            return st.nextToken();
        }

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    public static void main(String[] args) {
       FastReader in = new FastReader();
       int t = in.nextInt();
       while(t-- > 0){
           int n0 = in.nextInt();
           int n1 = in.nextInt();
           int n2 = in.nextInt();

           String res = "";
           if(n2>0) {
               for (int i = 0; i <= n2; i++) {
                   res += '1';
               }
           }
           if(n0 > 0) {
               for (int i = 0; i <= n0; i++) {
                   res += '0';
               }
           }
           if(n2 == 0 && n1 > 0){
               res +="10";
               n1--;
           }else if(n0 == 0 && n1 > 0){
               res += "01";
               n1--;
           }
           else{

                   n1--;

           }

           int s = 1;
           while(n1 > 0){
               res += s;
               s = 1 - s;
               n1--;
           }

           System.out.println(res);
       }
    }
}


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

public class Binary_S_Reconst {
    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 (Exception e) {

                    e.printStackTrace();
                }

            }
            return st.nextToken();
        }

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    public static void main(String[] args) {
       FastReader in = new FastReader();
       int t = in.nextInt();
       while(t-- > 0){
           int n0 = in.nextInt();
           int n1 = in.nextInt();
           int n2 = in.nextInt();

           String res = "";

           if( n0 == 0 && n1 == 0 && n2 > 0){
               for(int i = 0; i <=n2; i++){
                   res += '1';
               }
           }else if(n0 == 0 && n1 > 0 && n2 == 0){
               int y = 0;
               for(int i = 0; i <= n1; i++){
                   res += y;
                   y = 1 - y;
               }
           }else if(n0 > 0 && n1 == 0 && n2 == 0){
               for(int i = 0; i <=n0; i++){
                   res += '0';
               }
           }else if(n0 == 0 && n1 > 0 && n2 > 0){
               for(int i = 0; i <=n2; i++){
                   res += '1';
               }
               res += '0';
               n1--;
               int s = 1;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }
           }else if(n0 > 0 && n1 > 0 && n2 == 0){
               for(int i = 0; i <=n0; i++){
                   res += '0';
               }
               res += '1';
               n1--;
               int s = 0;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }

           }else{
               for (int i = 0; i <= n2; i++) {
                   res += '1';
               }
               for (int i = 0; i <= n0; i++) {
                   res += '0';
               }
               n1--;
               int s = 1;
               while(n1 > 0){
                   res += s;
                   s = 1 - s;
                   n1--;
               }

           }

           System.out.println(res);
       }
    }
}


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

public class Binary_S_Reconst {
    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 (Exception e) {

                    e.printStackTrace();
                }

            }
            return st.nextToken();
        }

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    public static void main(String[] args) {
       FastReader in = new FastReader();
       int t = in.nextInt();
       while(t-- > 0){
           int n0 = in.nextInt();
           int n1 = in.nextInt();
           int n2 = in.nextInt();

           String res = "";
           if(n2>0) {
               for (int i = 0; i <= n2; i++) {
                   res += '1';
               }
           }
           if(n0 > 0) {
               for (int i = 0; i <= n0; i++) {
                   res += '0';
               }
           }
           if(n2 == 0 && n1 > 0){
               if(n0 == 0) {
                   res += "10";
               }else{
                   res+="1";
               }
               n1--;
           }else if(n0 == 0 && n1 > 0){
               if(n2 == 0) {
                   res += "01";
               }else{
                   res += "0";
               }
               n1--;
           }
           else{

                   n1--;

           }

           int s = 1;
           while(n1 > 0){
               res += s;
               s = 1 - s;
               n1--;
           }

           System.out.println(res);
       }
    }
}


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

public class Binary_S_Reconst {
    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 (Exception e) {

                    e.printStackTrace();
                }

            }
            return st.nextToken();
        }

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

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

        long nextLong() {
            return Long.parseLong(next());
        }
    }
    public static void main(String[] args) {
       FastReader in = new FastReader();
       int t = in.nextInt();
       while(t-- > 0){
           int n0 = in.nextInt();
           int n1 = in.nextInt();
           int n2 = in.nextInt();

           String res = "";
           if(n2>0) {
               for (int i = 0; i <= n2; i++) {
                   res += '1';
               }
           }
           if(n0 > 0) {
               for (int i = 0; i <= n0; i++) {
                   res += '0';
               }
           }
           n1--;
           int s = 1;
           while(n1 > 0){
               res += s;
               s = 1 - s;
               n1--;
           }

           System.out.println(res);
       }
    }
}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Solution {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int a =sc.nextInt();
			int b=sc.nextInt();
			int c =sc.nextInt();
			StringBuilder sb = new StringBuilder();
			for(int i=0; c>0 &&i<c+1;i++) {
				sb.append("1");
			}
			if(a>0 && c>0)b--;
			for(int i=0;a>0 &&i<a+1;i++) {
				sb.append("0");

			}
			if(a==0 && b>0) {
				if(c>0) {
					sb.append("0");
				}else {
					sb.append("10");
				}
				b--;

			}
			for(int i=0;i<b;i++) {
				if(i%2==0)sb.append("1");
				else {
					sb.append("0");
				}
			}
			System.out.println(sb.toString());
		}
	}
}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

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

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

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

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

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

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

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

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Solution {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int a =sc.nextInt();
			int b=sc.nextInt();
			int c =sc.nextInt();
			StringBuilder sb = new StringBuilder();
			for(int i=0; c>0 &&i<c+1;i++) {
				sb.append("1");
			}
			if(a>0)b--;
			for(int i=0;a>0 &&i<a+1;i++) {
				sb.append("0");

			}
			if(a==0 && b>0) {
				sb.append("0");
			}
			for(int i=0;i<b;i++) {
				if(i%2==0)sb.append("1");
				else {
					sb.append("0");
				}
			}
			System.out.println(sb.toString());
		}
	}
}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

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

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

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

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

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

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

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

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Solution {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int a =sc.nextInt();
			int b=sc.nextInt();
			int c =sc.nextInt();
			StringBuilder sb = new StringBuilder();
			for(int i=0; c>0 &&i<c+1;i++) {
				sb.append("1");
			}
			if(a>0)b--;
			for(int i=0;a>0 &&i<a+1;i++) {
				sb.append("0");

			}
			if(a==0 && b>0) {
				sb.append("0");
				b--;
			}
			for(int i=0;i<b;i++) {
				if(i%2==0)sb.append("1");
				else {
					sb.append("0");
				}
			}
			System.out.println(sb.toString());
		}
	}
}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

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

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

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

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

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

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

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

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

public class Solution {
	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int t = sc.nextInt();
		while (t-- > 0) {
			int a =sc.nextInt();
			int b=sc.nextInt();
			int c =sc.nextInt();
			StringBuilder sb = new StringBuilder();
			for(int i=0; c>0 &&i<c+1;i++) {
				sb.append("1");
			}
			if(a>0)b--;
			for(int i=0;a>0 &&i<a+1;i++) {
				sb.append("0");

			}
			if(a==0 && b>0) {
				if(c>0) {
					sb.append("0");
				}else {
					sb.append("10");
				}
				b--;

			}
			for(int i=0;i<b;i++) {
				if(i%2==0)sb.append("1");
				else {
					sb.append("0");
				}
			}
			System.out.println(sb.toString());
		}
	}
}

class Scanner {
	StringTokenizer st;
	BufferedReader br;

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

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

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

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

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

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

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

}


//Code by Sounak, IIEST
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class Test3{
    public static void main(String args[])throws IOException{
        FastReader sc = new FastReader();
        long mod=1000000007;
        int test=sc.nextInt();
        while(--test>=0)
        {
            StringBuilder sb = new StringBuilder();
            int a=sc.nextInt();
            int b=sc.nextInt();
            int c=sc.nextInt();
            int i=0,ch=1;
            if(a==0 && b==0)
            {
                sb.append(1);
                i=1;
            }
            for(;i<=a;i++)
            sb.append(0);
            for(i=0;i<c;i++)
            sb.append(1);
            for(i=0;i<b;i++)
            {
                sb.append(ch);
                ch=1-ch;
            }
            System.out.println(sb);
        }
    }
    public static long gcd(long a, long b)
    {
        if (a == 0)
            return b;

        return gcd(b%a, a);
    }
}

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;
    }
}


//Code by Sounak, IIEST
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class Test3{
    public static void main(String args[])throws IOException{
        FastReader sc = new FastReader();
        long mod=1000000007;
        int test=sc.nextInt();
        while(--test>=0)
        {
            StringBuilder sb = new StringBuilder();
            int a=sc.nextInt();
            int b=sc.nextInt();
            int c=sc.nextInt();
            int i,ch=1;
            for(i=0;i<=a;i++)
            sb.append(0);
            for(i=0;i<b;i++)
            {
                sb.append(ch);
                ch=a-ch;
            }
            for(i=0;i<c;i++)
            sb.append(1);
            System.out.println(sb);
        }
    }
    public static long gcd(long a, long b)
    {
        if (a == 0)
            return b;

        return gcd(b%a, a);
    }
}

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;
    }
}


//Code by Sounak, IIEST
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;
public class Test3{
    public static void main(String args[])throws IOException{
        FastReader sc = new FastReader();
        long mod=1000000007;
        int test=sc.nextInt();
        while(--test>=0)
        {
            StringBuilder sb = new StringBuilder();
            int a=sc.nextInt();
            int b=sc.nextInt();
            int c=sc.nextInt();
            int i,ch=1;
            for(i=0;i<=a;i++)
            sb.append(0);
            for(i=1;i<b;i++)
            {
                sb.append(ch);
                ch=a-ch;
            }
            for(i=0;i<c;i++)
            sb.append(1);
            System.out.println(sb);
        }
    }
    public static long gcd(long a, long b)
    {
        if (a == 0)
            return b;

        return gcd(b%a, a);
    }
}

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.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x || y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.y=y;
            this.x=x;
        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static void print0(int i){
        while(i-->0)w.print(0);
    }
    static void print1(int i,int x){
        while(i-->0){
            w.print(x);
            x^=1;
        }
    }
    static void print2(int i){
        while(i-->0)w.print(1);
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int t=sc.ni();

        while(t-->0){
            int n0=sc.ni(),n1=sc.ni(),n2=sc.ni();
            ArrayList<Integer> arr=new ArrayList<>();
            if(n2>0)print2(n2+1);
            if(n0>0)print0(n0+1);
            if(n2>0&&n0>0){
                print1(n1-1,1);
            }
            else if(n2>0&&n0==0){
                print1(n1,0);
            }
            else if(n2==0&&n0>0){
                print1(n1,1);
            }
            else{
                print1(n1+1,1);
            }
            w.println();
        }
        w.close();
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x || y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.y=y;
            this.x=x;
        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;
    static void print0(int i){
        while(i-->0)w.print(0);
    }
    static void print1(int i){
        int x=1;
        while(i-->0){
            w.print(x);
            x^=1;
        }
    }
    static void print2(int i){
        while(i-->0)w.print(1);
    }
    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int t=sc.ni();

        while(t-->0){
            int n0=sc.ni(),n1=sc.ni(),n2=sc.ni();
            ArrayList<Integer> arr=new ArrayList<>();
            if(n2==0&&n0!=0)print0(n0+1);
            else if(n0==0&&n2!=0)print2(n2+1);
            else if(n0==0&&n2==0)print1(n1+1);
            else{
                print2(n2+1);
                print0(n0+1);
                n1--;
                print1(n1);
            }
            w.println();
        }
        w.close();
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x || y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.y=y;
            this.x=x;
        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;

    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int t=sc.ni();

        while(t-->0){
            int n0=sc.ni(),n1=sc.ni(),n2=sc.ni();
            ArrayList<Integer> arr=new ArrayList<>();
            if(n2>0){
                for(int i=0;i<=n2;i++)arr.add(1);
            }
            if(n1>0){
                if(arr.size()==0){
                    int x=1;
                    for(int i=0;i<=n1;i++){
                        arr.add(x);
                        x^=1;
                    }
                }
                else{
                    int x=0;
                    for(int i=0;i<n1;i++){
                        arr.add(x);
                        x^=1;
                    }
                }
            }
            if(n0>0){
                if(arr.size()==0){
                    for(int i=0;i<=n0;i++)arr.add(0);
                }
                else{
                    for(int i=0;i<n0;i++)arr.add(0);
                }
            }

            for(int i:arr)w.print(i);
            w.println();
        }
        w.close();
    }
}


import java.util.*;
import java.lang.*;
import java.io.*;
import java.math.*;
public class Prac{
    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar, snumChars;
        public InputReader(InputStream st) {
            this.stream = st;
        }
        public int read() {
            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                }
                catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }
        public int ni() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public long nl() {
            int c = read();
            while (isSpaceChar(c)) {
            c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }
        public int[] nia(int n) {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }
        public String rs() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                    c = read();
            } while (!isSpaceChar(c));
            return res.toString();
        }
        public String nextLine() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            StringBuilder res = new StringBuilder();
            do {
                res.appendCodePoint(c);
                c = read();
            } while (!isEndOfLine(c));
            return res.toString();
        }
        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private boolean isEndOfLine(int c) {
            return c == '\n' || c == '\r' || c == -1;
        }
    }
    public static class Key {

        private final int x;
        private final int y;

        public Key(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (!(o instanceof Key)) return false;
            Key key = (Key) o;
            return x == key.x || y == key.y;
        }

        @Override
        public int hashCode() {
            int result = x;
            result = 31 * result + y;
            return result;
        }

    }
    static class Pair{
        int x,y;
        public Pair(int x,int y){
            this.y=y;
            this.x=x;
        }
    }

    static PrintWriter w = new PrintWriter(System.out);
    static long mod=998244353L,mod1=1000000007;

    public static void main(String [] args){
        InputReader sc=new InputReader(System.in);
        int t=sc.ni();

        while(t-->0){
            int n0=sc.ni(),n1=sc.ni(),n2=sc.ni();
            ArrayList<Integer> arr=new ArrayList<>();
            while(n2-->0)arr.add(1);
            if(arr.size()>0)arr.add(1);
            int x=0;
            if(arr.size()==0&&n1>0)arr.add(1);
            while(n1-->0){
                arr.add(x);
                x^=1;
            }
            if(arr.size()==0)arr.add(0);
            while(n0-->0){
                arr.add(0);
            }
            for(int i:arr)w.print(i);
            w.println();
        }
        w.close();
    }
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Solution implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Solution(),"Main",1<<27).start();
	}

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

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}

	static void sortbycolomn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override

          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	public void run()
	{
		InputReader in = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int t=in.nextInt();
		while(t--!=0){
		    int n0=in.nextInt();
		    int n1=in.nextInt();
		    int n2=in.nextInt();
		    String s="";
		    if(n2!=0)
		        for(int i=0;i<=n2;i++) s+="1";
		    if(n2!=0){
		        if(n1>=1) s+="0";
		        for(int i=0;i<n1/2;i++) s+="10";
		    }
		    else{
		        if(n1!=0)
		            for(int i=0;i<=n1/2;i++) s+="10";
		    }
		    if(n1!=0)
		        for(int i=0;i<n0;i++) s+="0";
		    else{
		        if(n0!=0)
		            for(int i=0;i<=n0;i++) s+="0";
		    }
		    w.println(s);
		}

		w.flush();
		w.close();
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Solution implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Solution(),"Main",1<<27).start();
	}

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

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}

	static void sortbycolomn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override

          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	public void run()
	{
		InputReader in = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int t=in.nextInt();
		while(t--!=0){
		    int n0=in.nextInt();
		    int n1=in.nextInt();
		    int n2=in.nextInt();

		    if(n0==0 && n2==0){
		        int c=0;
		        for(int i=0;i<=n1;i++) w.print(c^=1);
		        w.println();
		        continue;
		    }
		    if(n0==0){
		        for(int i=0;i<=n2;i++) w.print("1");
		        int c=1;
		        for(int i=0;i<n1;i++) w.print(c^=1);
		        w.println();
		        continue;
		    }
		    if(n2==0){
		        for(int i=0;i<=n0;i++) w.print("0");
		        int c=0;
		        for(int i=0;i<n1;i++) w.print(c^=1);
		        w.println();
		        continue;
		    }
		    n1--;
		    for (int i = 0; i <= n0; i++) w.print('0');
            for (int i = 0; i <= n2; i++) w.print('1');
            int c = 1;
            for (int i = 0; i < n1; i++) w.print(c^=1);
            w.println();
		}

		w.flush();
		w.close();
	}
}


import java.io.*;
import java.util.*;
import java.math.*;
import java.lang.*;

import static java.lang.Math.*;

public class Solution implements Runnable
{
	static class InputReader
	{
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;
		private SpaceCharFilter filter;
		private BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		public InputReader(InputStream stream)
		{
			this.stream = stream;
		}

		public int read()
		{
			if (numChars==-1)
				throw new InputMismatchException();

			if (curChar >= numChars)
			{
				curChar = 0;
				try
				{
					numChars = stream.read(buf);
				}
				catch (IOException e)
				{
					throw new InputMismatchException();
				}

				if(numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine()
		{
			String str = "";
			try
			{
				str = br.readLine();
			}
			catch (IOException e)
			{
				e.printStackTrace();
			}
			return str;
		}
		public int nextInt()
		{
			int c = read();

			while(isSpaceChar(c))
				c = read();

			int sgn = 1;

			if (c == '-')
			{
				sgn = -1;
				c = read();
			}

			int res = 0;
			do
			{
				if(c<'0'||c>'9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			long res = 0;

			do
			{
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			while (!isSpaceChar(c));
				return res * sgn;
		}

		public double nextDouble()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-')
			{
				sgn = -1;
				c = read();
			}
			double res = 0;
			while (!isSpaceChar(c) && c != '.')
			{
				if (c == 'e' || c == 'E')
					return res * Math.pow(10, nextInt());
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			}
			if (c == '.')
			{
				c = read();
				double m = 1;
				while (!isSpaceChar(c))
				{
					if (c == 'e' || c == 'E')
						return res * Math.pow(10, nextInt());
					if (c < '0' || c > '9')
						throw new InputMismatchException();
					m /= 10;
					res += (c - '0') * m;
					c = read();
				}
			}
			return res * sgn;
		}

		public String readString()
		{
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do
			{
				res.appendCodePoint(c);
				c = read();
			}
			while (!isSpaceChar(c));

			return res.toString();
		}

		public boolean isSpaceChar(int c)
		{
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public String next()
		{
			return readString();
		}

		public interface SpaceCharFilter
		{
			public boolean isSpaceChar(int ch);
		}
	}
	public static void main(String args[]) throws Exception
	{
		new Thread(null, new Solution(),"Main",1<<27).start();
	}

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

	public static long findGCD(long arr[], int n)
	{
		long result = arr[0];
		for (int i = 1; i < n; i++)
			result = gcd(arr[i], result);
		return result;
	}

	static void sortbycolomn(int arr[][], int col)
    {

        Arrays.sort(arr, new Comparator<int[]>() {

          @Override

          public int compare(final int[] entry1,
                             final int[] entry2) {

            if (entry1[col] > entry2[col])
                return 1;
            else
                return -1;
          }
        });
    }

	public void run()
	{
		InputReader in = new InputReader(System.in);
		PrintWriter w = new PrintWriter(System.out);

		int t=in.nextInt();
		while(t--!=0){
		    int n0=in.nextInt();
		    int n1=in.nextInt();
		    int n2=in.nextInt();
		    String s="";
		    if(n2!=0)
		        for(int i=0;i<=n2;i++) s+="1";

		    if(n1!=0){
		    if(n2!=0){

		        char c='0';
		        for(int i=0;i<n1;i++){
		            s+=Character.toString(c);
		            c= c=='0'?'1':'0';
		        }

		    }
		    else{

		        s+='1';
		        char c='0';
		        for(int i=0;i<n1;i++){
		            s+=Character.toString(c);
		            c= c=='0'?'1':'0';
		        }

		    }
		    }

		    if(n0!=0){

		        if(n1!=0){
		            if(n1%2==0){
		                for(int i=0;i<=n0;i++) s+="0";
		            }
		            else
		                for(int i=0;i<n0;i++) s+="0";
		        }
		        else{
		            for(int i=0;i<=n0;i++) s+="0";
		        }
		    }
		    w.println(s);
		}

		w.flush();
		w.close();
	}
}


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 = "";
            if(b==0){
                if(a==0){
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                    }
                }
                else{
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                    }
                }
            }
            else{
                ans = "10";
                String temp = "";
                for(int i = 0; i<c; i++){
                    temp+="1";
                }
                ans = temp+ans;
                temp = "";
                for(int i = 0; i<a; i++){
                    temp+="0";
                }
                ans = ans + temp;
                boolean check = false;
                for(int i = 1; i<b; i++){
                    if(check){
                        ans+="0";
                        check = false;
                    }
                    else{
                        ans+="1";
                        check = true;
                    }
                }
            }
            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.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 = "";
            if(b==0){
                if(c==0){
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                    }
                }
                else{
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                    }
                }
            }
            else if(b%2==0){
                if(c==0){
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="0";
                            check = false;
                        }
                        else{
                            ans+="1";
                            check = true;
                        }
                    }
                }
                else{
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="1";
                            check = false;
                        }
                        else{
                            ans+="0";
                            check = true;
                        }
                    }
                    for(int i = 0; i<a; i++){
                        ans+="0";
                    }
                }
            }
            else{
                if(a==0){
                    ans = "1";
                    for(int i = 0; i<c; i++){
                        ans+="1";
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="1";
                            check = false;
                        }
                        else{
                            ans+="0";
                            check = true;
                        }
                    }
                }
                else{
                    ans = "0";
                    for(int i = 0; i<a; i++){
                        ans+="0";
                    }
                    boolean check = false;
                    for(int i = 0; i<b; i++){
                        if(check){
                            ans+="0";
                            check = false;
                        }
                        else{
                            ans+="1";
                            check = true;
                        }
                    }
                    for(int i = 0; i<c; i++){
                        ans+="1";
                    }
                }
            }
            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;
        }
    }
}