class Ideone
{
public static void main
(String[] args
) {
f(false, false, false);
f(false, false, true);
f(false, true, false);
f(false, true, true);
f(true, false, false);
f(true, false, true);
f(true, true, false);
f(true, true, true);
}
static void f(boolean x, boolean y, boolean z)
{
boolean A01 = and(x, y);
boolean A02 = and(x, z);
boolean A03 = and(y, z);
boolean O01 = or(x, y);
boolean O02 = or(x, z);
boolean O03 = or(y, z);
boolean A04 = and(x, A03);
boolean A05 = and(O02, O03);
boolean O04 = or(x, O03);
boolean A06 = and(O01, A05);
boolean N01 = not(A06);
boolean A07 = and(O01, N01);
boolean A08 = and(O02, N01);
boolean A09 = and(O03, N01);
boolean O05 = or(A01, N01);
boolean O06 = or(A02, N01);
boolean O07 = or(A03, N01);
boolean O08 = or(A04, N01);
boolean A10 = and(O04, O08);
boolean N02 = not(A10);
boolean O09 = or(A07, N02);
boolean O10 = or(A08, N02);
boolean O11 = or(A09, N02);
boolean A11 = and(O05, O09);
boolean A12 = and(O06, O10);
boolean A13 = and(O07, O11);
System.
out.
printf("in(%s, %s, %s) out(%s, %s, %s)%n", x, y, z, A13, A12, A11
); }
static boolean and(boolean a, boolean b) { return a & b; }
static boolean or(boolean a, boolean b) { return a | b; }
static boolean not(boolean a) { return !a; }
}
Y2xhc3MgSWRlb25lCnsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpCiAgICB7CiAgICAgICAgZihmYWxzZSwgZmFsc2UsIGZhbHNlKTsKICAgICAgICBmKGZhbHNlLCBmYWxzZSwgdHJ1ZSk7CiAgICAgICAgZihmYWxzZSwgdHJ1ZSwgZmFsc2UpOwogICAgICAgIGYoZmFsc2UsIHRydWUsIHRydWUpOwogICAgICAgIGYodHJ1ZSwgZmFsc2UsIGZhbHNlKTsKICAgICAgICBmKHRydWUsIGZhbHNlLCB0cnVlKTsKICAgICAgICBmKHRydWUsIHRydWUsIGZhbHNlKTsKICAgICAgICBmKHRydWUsIHRydWUsIHRydWUpOwogICAgfQoKIC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gPSBvcihBMDksIE4wMik7CiAgICAgICAgYm9vbGVhbiBBMTEgPSBhbmQoTzA1LCBPMDkpOwogICAgICAgIGJvb2xlYW4gQTEyID0gYW5kKE8wNiwgTzEwKTsKICAgICAgICBib29sZWFuIEExMyA9IGFuZChPMDcsIE8xMSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGYoImluKCVzLCAlcywgJXMpIG91dCglcywgJXMsICVzKSVuIiwgeCwgeSwgeiwgQTEzLCBBMTIsIEExMSk7CiAgICB9CgogICAgc3RhdGljIGJvb2xlYW4gYW5kKGJvb2xlYW4gYSwgYm9vbGVhbiBiKSB7IHJldHVybiBhICYgYjsgfQogICAgc3RhdGljIGJvb2xlYW4gb3IoYm9vbGVhbiBhLCBib29sZWFuIGIpIHsgcmV0dXJuIGEgfCBiOyB9CiAgICBzdGF0aWMgYm9vbGVhbiBub3QoYm9vbGVhbiBhKSB7IHJldHVybiAhYTsgfQp9
in(false, false, false) out(true, true, true)
in(false, false, true) out(true, true, false)
in(false, true, false) out(true, false, true)
in(false, true, true) out(true, false, false)
in(true, false, false) out(false, true, true)
in(true, false, true) out(false, true, false)
in(true, true, false) out(false, false, true)
in(true, true, true) out(false, false, false)