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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.s: C = None
        self.p: A = None
        self.q: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

e = A("e")
f = B("f")
h = C("h")
n = D("n")
b = E("b")
i = F("i")
c = A("c")
a = D("a")

e.z = a
e.s = h
e.p = f
e.r = f
f.x = h
f.s = h
f.o = h
f.y = i
f.q = i
f.p = e
h.p = n
n.x = f
n.p = f
n.z = f
b.y = f
b.s = f
b.v = i
b.t = a
i.s = f
i.z = h
i.v = h
i.x = h
c.z = n
c.s = h
c.p = f
c.r = f
a.x = f
a.p = f
a.z = f
assert e.z.x.q.z.p.p.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: C = None
        self.p: B = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.s: C = None
        self.p: A = None
        self.q: F = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: B = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: F = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: C = None
        self.v: C = None
        self.x: C = None
        self.txt = txt

e = A("e")
f = B("f")
h = C("h")
n = D("n")
b = E("b")
i = F("i")
c = A("c")
a = D("a")

e.z = a
e.s = h
e.p = f
e.r = f
f.x = h
f.s = h
f.o = h
f.y = i
f.q = i
f.p = e
h.p = n
n.x = f
n.p = f
n.z = f
b.y = f
b.s = f
b.v = i
b.t = a
i.s = f
i.z = h
i.v = h
i.x = h
c.z = n
c.s = h
c.p = f
c.r = f
a.x = f
a.p = f
a.z = f
assert e.z.x.q.z.p.p.o.p.txt == "n"