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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.y: J = None
        self.o: C = None
        self.p: H = None
        self.s: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.v: J = None
        self.o: E = None
        self.y: C = None
        self.q: E = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: I = None
        self.y: J = None
        self.o: C = None
        self.p: H = None
        self.s: B = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: A = None
        self.v: J = None
        self.o: E = None
        self.y: C = None
        self.q: E = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: C = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

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

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