#include "bits/stdc++.h" #pragma warning(disable:4996) using namespace std; long long int mod=1e9+7; pairmul( pair&l, pair&r) { auto p=make_pair(l.first*r.first,l.second*r.first+r.second); return make_pair(p.first%mod,p.second%mod); } pair solve(pair a, long long int b) { pairanswer(1,0); if(b==0)return answer; if (b % 2) { answer=a; } auto x=solve(a,b/2); x=mul(x,x); answer=mul(answer,x); return answer; } int main() { int N;cin>>N; vectoranss(1<>a; num+=a; } cin>>anss[num]; } string ans=""; if (count(anss.begin(), anss.end(), 1) == 0) { ans="⊥"; } else if (count(anss.begin(), anss.end(), 1) == (1 << N)) { ans="⊤"; } else { for (int i = 0; i < (1 << N); ++i) { if (anss[i]) { ans+="("; for (int j = N - 1; j >= 0; --j) { string ast; if (i&(1 << j)) { ast+="¬"; } ast+="P_"; ast+=to_string(N-j); ans+=ast; if (j) { ans += "∧"; } } ans += ")"; ans += "∨"; } } ans.pop_back(); } cout<<"A="<