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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.x: B = None
        self.w: A = None
        self.p: D = None
        self.t: H = None
        self.y: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.z: J = None
        self.t: B = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: F = None
        self.s: A = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.t: D = None
        self.p: D = None
        self.u: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.x: B = None
        self.w: A = None
        self.p: D = None
        self.t: H = None
        self.y: D = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.z: J = None
        self.t: B = None
        self.w: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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