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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.u: B = None
        self.y: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.s: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.u: G = None
        self.y: E = None
        self.q: B = None
        self.o: J = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.u: B = None
        self.y: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: E = None
        self.s: D = None
        self.v: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.r: D = None
        self.u: G = None
        self.y: E = None
        self.q: B = None
        self.o: J = None
        self.z: D = None
        self.txt = txt

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

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

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