#include using namespace std; int A[5000][100]; int B[100]; int main(){ int n;cin>>n; int nya = 0; for(int i = 0; (1< i; i++){ for(int j = 0; n > j; j++){ cin>>A[i][j]; } cin>>B[i]; if(B[i])nya++; } cout << "A="; if(!nya){ cout << "⊥"; }else if(nya == (1< i; i++){ if(!B[i])continue; if(fs){ fs = false; }else{ cout << "∨"; } cout << "("; for(int j = 0; n > j; j++){ if(!A[i][j])cout << "¬"; cout << "P_" << j+1; if(j+1 != n)cout << "∧"; } cout << ")"; } } cout << endl; }