class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: J = None
        self.u: B = None
        self.y: H = None
        self.r: C = None
        self.s: D = None
        self.q: I = None
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.w: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.w: C = None
        self.p: B = None
        self.o: F = None
        self.y: H = None
        self.z: I = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: H = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: J = None
        self.s: F = None
        self.z: G = None
        self.t: F = None
        self.o: J = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.w: C = None
        self.q: E = None
        self.v: H = None
        self.t: B = None
        self.x: J = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.y: C = None
        self.u: H = None
        self.w: C = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: E = None
        self.w: D = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.w: C = None
        self.p: B = None
        self.o: F = None
        self.y: H = None
        self.z: I = None
        self.u: C = None
        self.v: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: H = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: G = None
        self.v: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: J = None
        self.s: F = None
        self.z: G = None
        self.t: F = None
        self.o: J = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: H = None
        self.w: C = None
        self.q: E = None
        self.v: H = None
        self.t: B = None
        self.x: J = None
        self.s: F = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: I = None
        self.y: C = None
        self.u: H = None
        self.w: C = None
        self.q: G = None
        self.x: B = None
        self.txt = txt

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

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