class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.w: E = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

k = A("k")
d = B("d")
l = C("l")
i = D("i")
b = E("b")
h = E("h")
f = B("f")

k.y = i
k.v = i
k.u = i
k.q = f
d.t = l
d.w = f
d.z = f
d.q = i
l.z = k
l.o = k
l.u = i
i.p = b
i.u = b
i.o = l
i.w = h
i.y = f
b.y = h
b.t = d
h.y = b
h.t = d
f.t = l
f.w = d
f.z = d
f.q = i
assert b.y.y.y.t.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: D = None
        self.q: B = None
        self.u: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: C = None
        self.w: E = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

k = A("k")
d = B("d")
l = C("l")
i = D("i")
b = E("b")
h = E("h")
f = B("f")

k.y = i
k.v = i
k.u = i
k.q = f
d.t = l
d.w = f
d.z = f
d.q = i
l.z = k
l.o = k
l.u = i
i.p = b
i.u = b
i.o = l
i.w = h
i.y = f
b.y = h
b.t = d
h.y = b
h.t = d
f.t = l
f.w = d
f.z = d
f.q = i
assert b.y.y.y.t.q.u.txt == "b"