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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.p: C = None
        self.u: C = None
        self.r: A = None
        self.txt = txt

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

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

j.s = l
n.z = c
n.y = c
n.v = j
n.s = i
n.q = l
e.z = c
e.w = c
e.u = j
e.x = i
c.w = n
c.q = j
c.r = j
c.p = e
c.u = e
l.y = j
l.u = j
i.z = c
i.y = c
i.v = j
i.s = n
i.q = l
assert e.w.r.s.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: A = None
        self.p: C = None
        self.u: C = None
        self.r: A = None
        self.txt = txt

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

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

j.s = l
n.z = c
n.y = c
n.v = j
n.s = i
n.q = l
e.z = c
e.w = c
e.u = j
e.x = i
c.w = n
c.q = j
c.r = j
c.p = e
c.u = e
l.y = j
l.u = j
i.z = c
i.y = c
i.v = j
i.s = n
i.q = l
assert e.w.r.s.y.txt == "j"