<>;$"='∧';@_=grep{@Q=glob;$_=$i=pop@Q&&"(@{[map'¬'x!$_.P_.++$i,@Q]})"}<>;print'A=',@_?@_<$.-1?join'∨',@_:'⊤':'⊥'