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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
j = C("j")
m = D("m")
l = E("l")
e = A("e")
g = E("g")
i = B("i")

c.q = j
c.y = j
c.o = m
c.t = e
c.p = e
h.w = e
h.q = j
h.y = l
h.v = l
j.x = l
m.s = h
m.y = h
m.w = l
l.w = m
l.z = h
l.q = j
e.q = j
e.y = j
e.o = m
e.t = c
e.p = c
g.w = m
g.z = i
g.q = j
i.w = c
i.q = j
i.y = g
i.v = g
assert m.y.v.q.x.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: D = None
        self.t: A = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

c = A("c")
h = B("h")
j = C("j")
m = D("m")
l = E("l")
e = A("e")
g = E("g")
i = B("i")

c.q = j
c.y = j
c.o = m
c.t = e
c.p = e
h.w = e
h.q = j
h.y = l
h.v = l
j.x = l
m.s = h
m.y = h
m.w = l
l.w = m
l.z = h
l.q = j
e.q = j
e.y = j
e.o = m
e.t = c
e.p = c
g.w = m
g.z = i
g.q = j
i.w = c
i.q = j
i.y = g
i.v = g
assert m.y.v.q.x.w.w.txt == "l"