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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.o: C = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

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

j.y = m
m.t = i
m.x = f
m.z = n
b.t = j
b.w = j
b.s = l
h.x = l
h.s = l
h.o = l
h.v = l
h.q = f
i.t = m
i.v = m
i.q = m
i.y = l
l.t = j
l.w = j
l.s = b
f.x = b
f.s = b
f.o = b
f.v = b
f.q = n
n.x = l
n.s = l
n.o = l
n.v = l
n.q = h
assert n.q.v.w.y.z.s.t.y.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: C = None
        self.o: C = None
        self.q: D = None
        self.v: C = None
        self.txt = txt

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

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

j.y = m
m.t = i
m.x = f
m.z = n
b.t = j
b.w = j
b.s = l
h.x = l
h.s = l
h.o = l
h.v = l
h.q = f
i.t = m
i.v = m
i.q = m
i.y = l
l.t = j
l.w = j
l.s = b
f.x = b
f.s = b
f.o = b
f.v = b
f.q = n
n.x = l
n.s = l
n.o = l
n.v = l
n.q = h
assert n.q.v.w.y.z.s.t.y.txt == "m"