class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: D = None
        self.w: E = None
        self.y: F = None
        self.p: G = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.r: E = None
        self.o: F = None
        self.y: H = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.v: G = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: J = None
        self.v: D = None
        self.w: I = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.q: G = None
        self.u: A = None
        self.t: B = None
        self.o: I = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: I = None
        self.r: E = None
        self.o: F = None
        self.y: H = None
        self.p: F = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.v: G = None
        self.p: H = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: J = None
        self.v: D = None
        self.w: I = None
        self.q: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: G = None
        self.q: G = None
        self.u: A = None
        self.t: B = None
        self.o: I = None
        self.p: E = None
        self.txt = txt

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

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