class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: H = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.o: G = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.x: G = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

e = A("e")
l = B("l")
i = C("i")
n = D("n")
j = E("j")
k = F("k")
m = G("m")
h = H("h")
d = I("d")
c = G("c")

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: E = None
        self.s: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.o: G = None
        self.v: G = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: B = None
        self.x: G = None
        self.q: H = None
        self.z: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: B = None
        self.y: A = None
        self.q: E = None
        self.txt = txt

e = A("e")
l = B("l")
i = C("i")
n = D("n")
j = E("j")
k = F("k")
m = G("m")
h = H("h")
d = I("d")
c = G("c")

e.y = n
e.x = h
e.q = i
l.s = c
i.q = j
n.w = k
n.u = k
n.v = j
n.s = c
j.t = n
j.y = h
j.o = m
j.v = m
j.s = e
k.v = l
k.s = l
k.x = m
k.q = h
k.z = n
m.x = c
m.u = c
m.v = c
m.p = e
m.z = l
m.s = l
h.s = k
d.s = h
d.r = l
d.y = e
d.q = j
c.x = m
c.u = m
c.v = m
c.p = e
c.z = l
c.s = l
assert m.z.s.p.x.s.x.txt == "m"