class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: I = None
        self.q: I = None
        self.r: I = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.p: B = None
        self.z: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.u: B = None
        self.t: J = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: I = None
        self.q: I = None
        self.r: I = None
        self.z: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.p: B = None
        self.z: A = None
        self.w: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: E = None
        self.u: B = None
        self.t: J = None
        self.x: D = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: G = None
        self.s: A = None
        self.p: A = None
        self.txt = txt

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

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

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