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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.t: D = None
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

i = A("i")
m = B("m")
b = C("b")
g = D("g")
l = E("l")
h = C("h")
d = E("d")
a = B("a")

i.z = d
i.s = l
i.p = a
i.u = m
m.t = h
m.w = b
b.s = h
b.p = l
b.u = l
b.t = g
b.x = g
g.x = l
l.y = d
h.s = b
h.p = d
h.t = g
h.x = g
h.u = l
d.y = l
a.t = b
a.w = b
assert h.s.u.y.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.p: B = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: E = None
        self.t: D = None
        self.u: E = None
        self.x: D = None
        self.txt = txt

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

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

i = A("i")
m = B("m")
b = C("b")
g = D("g")
l = E("l")
h = C("h")
d = E("d")
a = B("a")

i.z = d
i.s = l
i.p = a
i.u = m
m.t = h
m.w = b
b.s = h
b.p = l
b.u = l
b.t = g
b.x = g
g.x = l
l.y = d
h.s = b
h.p = d
h.t = g
h.x = g
h.u = l
d.y = l
a.t = b
a.w = b
assert h.s.u.y.y.y.y.txt == "l"