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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
d = C("d")
k = D("k")
j = E("j")

l.q = j
l.y = e
l.v = k
e.q = k
d.w = j
d.o = j
d.t = l
d.v = k
k.y = j
k.p = j
k.v = e
k.u = e
j.u = l
j.t = k
j.w = k
j.y = e
assert j.t.u.q.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.v: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: A = None
        self.v: D = None
        self.o: E = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
d = C("d")
k = D("k")
j = E("j")

l.q = j
l.y = e
l.v = k
e.q = k
d.w = j
d.o = j
d.t = l
d.v = k
k.y = j
k.p = j
k.v = e
k.u = e
j.u = l
j.t = k
j.w = k
j.y = e
assert j.t.u.q.y.y.txt == "e"