def lscan; gets.chomp.split.map(&:to_i); end def solve(n, m, k) if n == 0 return '-1' if k > 0 return '1'*m end if m == 0 return '-1' if k > 0 return '0'*n end # 10001 > 00110 # 10101 k=4 # 01010 k=4 # 0010110 k=4 if k.odd? c = [n,m].min return '-1' if c*2 < k+1 # mid = '01'*c n -= c m -= c return '0'*n + '01'*c + '1'*m end if k.even? if n >= k/2+1 && m >= k/2 # 0010110 c = k/2 # mid = '01'*c n -= c m -= c # tail = '0' n -= 1 return '0'*n + '01'*c + '1'*m + '0' end if n >= k/2 && m >= k/2+1 # 10-0101 c = k/2 # mid = '01'*c n -= c m -= c # head = '1' m -= 1 return '1' + '0'*n + '01'*c + '1'*m end end '-1' end while line = gets puts solve(*line.chomp.split.map(&:to_i)) end