class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.o: F = None
        self.u: F = None
        self.p: J = None
        self.v: I = None
        self.y: E = None
        self.r: H = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.y: A = None
        self.q: A = None
        self.z: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: E = None
        self.z: D = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: E = None
        self.y: A = None
        self.q: A = None
        self.z: G = None
        self.u: A = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.z: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: E = None
        self.z: D = None
        self.x: C = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: B = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

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

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