class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.u: E = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.y: C = None
        self.r: I = None
        self.o: E = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

a = A("a")
m = B("m")
g = C("g")
b = D("b")
h = E("h")
n = F("n")
l = G("l")
c = H("c")
e = I("e")
j = J("j")

a.o = j
m.o = b
g.z = h
g.u = h
g.s = a
g.p = l
g.q = b
b.z = l
h.v = g
h.q = e
h.p = a
h.z = l
h.x = l
h.w = n
h.t = c
n.z = g
l.y = g
l.p = g
l.t = m
l.w = a
l.o = a
l.v = e
l.u = b
l.z = b
l.x = n
c.x = a
c.w = l
c.v = l
c.p = l
c.s = b
c.u = b
c.y = m
e.r = g
e.q = j
j.s = l
j.v = h
j.o = h
j.z = h
j.y = g
j.r = e
j.u = a
assert m.o.z.x.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: A = None
        self.u: E = None
        self.p: G = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.y: C = None
        self.r: I = None
        self.o: E = None
        self.u: A = None
        self.z: E = None
        self.txt = txt

a = A("a")
m = B("m")
g = C("g")
b = D("b")
h = E("h")
n = F("n")
l = G("l")
c = H("c")
e = I("e")
j = J("j")

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