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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: G = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: G = None
        self.o: B = None
        self.q: A = None
        self.p: A = None
        self.r: B = None
        self.x: I = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: I = None
        self.x: I = None
        self.r: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.s: F = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.y: H = None
        self.v: A = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: J = None
        self.y: G = None
        self.s: A = None
        self.x: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: G = None
        self.o: B = None
        self.q: A = None
        self.p: A = None
        self.r: B = None
        self.x: I = None
        self.s: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: I = None
        self.x: I = None
        self.r: J = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: B = None
        self.r: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.s: F = None
        self.p: B = None
        self.w: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: F = None
        self.y: H = None
        self.v: A = None
        self.w: H = None
        self.txt = txt

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

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