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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: G = None
        self.u: I = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: A = None
        self.p: I = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.t: B = None
        self.x: F = None
        self.z: H = None
        self.w: A = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: C = None
        self.o: A = None
        self.y: G = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

m = A("m")
g = B("g")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
j = G("j")
a = H("a")
e = I("e")
f = J("f")

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: G = None
        self.u: I = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.o: A = None
        self.p: I = None
        self.s: G = None
        self.x: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.t: B = None
        self.x: F = None
        self.z: H = None
        self.w: A = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: C = None
        self.o: A = None
        self.y: G = None
        self.z: G = None
        self.p: I = None
        self.txt = txt

m = A("m")
g = B("g")
b = C("b")
l = D("l")
h = E("h")
i = F("i")
j = G("j")
a = H("a")
e = I("e")
f = J("f")

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