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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: I = None
        self.o: F = None
        self.q: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.v: E = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: D = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.w: I = None
        self.o: F = None
        self.q: C = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: C = None
        self.v: E = None
        self.o: F = None
        self.t: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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