class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: D = None
        self.z: D = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: A = None
        self.txt = txt

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

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

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

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