class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: G = None
        self.t: C = None
        self.s: I = None
        self.x: C = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.s: C = None
        self.r: I = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: A = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: I = None
        self.r: E = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: E = None
        self.y: A = None
        self.s: C = None
        self.r: I = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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