aA+bB+cC+dAB+eBC+fCA+gABC+x=N
N=50
a+d+f+g=38
b+d+e+g=33
c+e+f+g=23
d+g=25
e+g=18
f+g=16
g=14
d?
x?