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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.t: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

a = A("a")
b = B("b")
e = C("e")
l = D("l")
c = E("c")
f = D("f")
i = B("i")
k = E("k")
h = E("h")
j = C("j")

a.r = b
a.q = c
a.z = c
a.u = e
b.w = a
b.v = f
e.t = j
e.s = a
e.z = l
l.o = f
c.p = j
c.y = e
c.t = e
c.w = e
c.q = a
f.o = l
i.w = a
i.v = l
k.p = j
k.y = j
k.t = e
k.w = e
k.q = a
h.p = e
h.t = e
h.y = j
h.w = j
h.q = a
j.t = e
j.s = a
j.z = f
assert f.o.o.o.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: E = None
        self.z: E = None
        self.u: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: C = None
        self.t: C = None
        self.w: C = None
        self.q: A = None
        self.txt = txt

a = A("a")
b = B("b")
e = C("e")
l = D("l")
c = E("c")
f = D("f")
i = B("i")
k = E("k")
h = E("h")
j = C("j")

a.r = b
a.q = c
a.z = c
a.u = e
b.w = a
b.v = f
e.t = j
e.s = a
e.z = l
l.o = f
c.p = j
c.y = e
c.t = e
c.w = e
c.q = a
f.o = l
i.w = a
i.v = l
k.p = j
k.y = j
k.t = e
k.w = e
k.q = a
h.p = e
h.t = e
h.y = j
h.w = j
h.q = a
j.t = e
j.s = a
j.z = f
assert f.o.o.o.o.txt == "f"