class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.o: B = None
        self.t: F = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.u: D = None
        self.s: F = None
        self.w: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.s: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.r: A = None
        self.s: E = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

n = A("n")
c = B("c")
m = C("m")
j = D("j")
b = E("b")
f = F("f")
d = D("d")

n.p = c
n.o = c
n.s = c
n.z = f
n.t = f
n.w = m
c.z = b
c.p = n
c.r = n
m.t = n
m.z = f
m.s = f
m.u = j
m.w = b
m.x = d
j.q = c
j.v = f
j.x = f
b.x = j
b.o = m
b.t = m
b.s = n
f.z = b
f.t = b
f.s = b
f.v = b
f.x = b
f.r = n
d.q = c
d.v = f
d.x = f
assert c.p.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: F = None
        self.o: B = None
        self.t: F = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: F = None
        self.u: D = None
        self.s: F = None
        self.w: E = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: F = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.s: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: E = None
        self.r: A = None
        self.s: E = None
        self.v: E = None
        self.x: E = None
        self.txt = txt

n = A("n")
c = B("c")
m = C("m")
j = D("j")
b = E("b")
f = F("f")
d = D("d")

n.p = c
n.o = c
n.s = c
n.z = f
n.t = f
n.w = m
c.z = b
c.p = n
c.r = n
m.t = n
m.z = f
m.s = f
m.u = j
m.w = b
m.x = d
j.q = c
j.v = f
j.x = f
b.x = j
b.o = m
b.t = m
b.s = n
f.z = b
f.t = b
f.s = b
f.v = b
f.x = b
f.r = n
d.q = c
d.v = f
d.x = f
assert c.p.p.p.txt == "n"