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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: A = None
        self.w: H = None
        self.z: A = None
        self.o: A = None
        self.x: H = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.y: A = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
c = C("c")
e = D("e")
g = E("g")
k = F("k")
a = G("a")
d = H("d")
i = I("i")
l = J("l")

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: A = None
        self.w: H = None
        self.z: A = None
        self.o: A = None
        self.x: H = None
        self.q: A = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: G = None
        self.y: A = None
        self.t: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

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

m = A("m")
b = B("b")
c = C("c")
e = D("e")
g = E("g")
k = F("k")
a = G("a")
d = H("d")
i = I("i")
l = J("l")

m.t = b
m.w = c
b.s = m
c.t = i
e.r = l
e.v = m
e.z = m
e.o = m
e.q = m
e.w = d
e.x = d
e.s = k
g.q = d
g.o = c
k.s = m
k.y = m
k.t = m
k.z = a
k.r = e
a.w = b
a.v = b
a.z = b
d.t = m
i.q = c
i.o = d
i.z = m
l.t = k
l.p = g
assert k.z.z.s.w.t.txt == "i"