from random import shuffle
x = [1]*9 + [0]*7
shuffle(x)
print(x[:len(x)//2], x[len(x)//2:])
# 1 _ 0 1, 1 _ _ 0
# 101, 10
# 110, _
#...
# _ _ _ _, 1, _, _, _
# _, _, 1, _
# _, 1
# 1
# we could never solve the input: [0, 1, 0, 1, 1, 0, 0, 1] [1, 1, 1, 0, 1, 0, 0, 1]
# so we have to pass a penguin up if one side is none, otherwise
0, _, 0, 1 - 0, 1, 1, 1
#lets pass penguin up in none case now, but still ignore if mismatch
0, _ - _, 1
0, 1
_
# we should be passing something up/doing something when the two mismatch
# this heuristic fails when input: [0, 0, 0, 1, 0, 0, 1, 1] [0, 0, 1, 1, 1, 1, 1, 1]
# let's try again, this time we'll just pass up both of them lol
0, _, 0, 1 - 0, 1, 1, 1
0, 0, 1 - 0, 1, 1
# this fails, we no longer have a majority for our original majority species