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

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

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

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

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

d = A("d")
i = B("i")
b = C("b")
f = D("f")
j = E("j")
k = E("k")
m = A("m")
h = C("h")
c = E("c")
a = A("a")

d.w = f
d.t = f
d.q = f
d.v = f
d.z = k
i.q = b
b.y = i
b.p = f
b.t = h
f.y = i
j.q = b
j.y = b
j.p = d
j.r = c
j.u = c
k.q = h
k.y = h
k.p = a
k.r = c
k.u = c
m.w = f
m.t = f
m.q = f
m.v = f
m.z = k
h.y = i
h.p = f
h.t = b
c.q = b
c.p = m
c.r = j
c.u = k
c.y = h
a.w = f
a.t = f
a.q = f
a.v = f
a.z = j
assert m.v.y.q.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.z: E = None
        self.q: D = None
        self.v: D = None
        self.txt = txt

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

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

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

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

d = A("d")
i = B("i")
b = C("b")
f = D("f")
j = E("j")
k = E("k")
m = A("m")
h = C("h")
c = E("c")
a = A("a")

d.w = f
d.t = f
d.q = f
d.v = f
d.z = k
i.q = b
b.y = i
b.p = f
b.t = h
f.y = i
j.q = b
j.y = b
j.p = d
j.r = c
j.u = c
k.q = h
k.y = h
k.p = a
k.r = c
k.u = c
m.w = f
m.t = f
m.q = f
m.v = f
m.z = k
h.y = i
h.p = f
h.t = b
c.q = b
c.p = m
c.r = j
c.u = k
c.y = h
a.w = f
a.t = f
a.q = f
a.v = f
a.z = j
assert m.v.y.q.t.p.txt == "f"