if ((Selected[0]-Selected[1] == Selected[2]) and (Selected[3]/Selected[4]==Selected[5] and Selected[3]%Selected[4]==0) and (Selected[6]+Selected[7] == Selected[8]) and (Selected[2]*Selected[5] == Selected[8])):
print "%s "*9 % tuple([chr(65+i)+"="+str(Selected[i]) for i in range(len(Selected))])