class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: J = None
        self.q: I = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.q: H = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: C = None
        self.u: E = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: G = None
        self.u: F = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: I = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: J = None
        self.q: H = None
        self.p: A = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: C = None
        self.u: E = None
        self.x: C = None
        self.y: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: G = None
        self.u: F = None
        self.p: B = None
        self.s: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: I = None
        self.p: F = None
        self.txt = txt

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

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