import sequtils,strutils,times template times*(n:int,body) = (for _ in 0.." ,discardable.} proc scan(): int = while true: let k = getchar_unlocked() if k < '0' : return result = 10 * result + k.ord - '0'.ord proc fputs(c: cstring, f: File) {.importc: "fputs", header: "",tags: [WriteIOEffect].} template put(c:untyped) = fputs(cstring(c),stdout) proc funlockfile(f:File) {.importc: "funlockfile", header:"" .} stdout.write "A=" let n = scan() var Q = newSeq[string]() if n == 1: 2.times: let q = scan() let r = scan() if r == 0 : continue if q == 0 : Q &= "(¬P_1)" else: Q &= "(P_1)" else: stopwatch: var arr = newSeq[int](n) (1 shl n).times: for i in 0..