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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.s: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: D = None
        self.s: D = None
        self.r: E = None
        self.p: D = None
        self.txt = txt

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

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