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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

c = A("c")
d = B("d")
l = C("l")
b = B("b")
a = A("a")
h = A("h")
e = C("e")

c.o = d
c.z = b
c.w = l
d.z = e
d.w = e
d.u = l
l.x = b
l.v = e
b.z = l
b.u = e
b.w = e
a.o = b
a.z = d
a.w = l
h.o = d
h.z = b
h.w = e
e.x = b
e.v = l
assert e.x.z.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.w: C = None
        self.txt = txt

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

c = A("c")
d = B("d")
l = C("l")
b = B("b")
a = A("a")
h = A("h")
e = C("e")

c.o = d
c.z = b
c.w = l
d.z = e
d.w = e
d.u = l
l.x = b
l.v = e
b.z = l
b.u = e
b.w = e
a.o = b
a.z = d
a.w = l
h.o = d
h.z = b
h.w = e
e.x = b
e.v = l
assert e.x.z.v.x.txt == "b"