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

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

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

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

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

c = A("c")
l = B("l")
j = C("j")
e = D("e")
f = E("f")
i = B("i")

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

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

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

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

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

c = A("c")
l = B("l")
j = C("j")
e = D("e")
f = E("f")
i = B("i")

c.s = j
c.t = f
c.u = e
l.q = c
j.q = e
e.q = i
e.v = i
e.w = j
e.o = l
e.z = f
f.u = c
f.v = c
f.y = j
f.q = e
i.q = c
assert f.v.t.y.txt == "j"