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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: A = None
        self.w: J = None
        self.t: F = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.s: I = None
        self.z: J = None
        self.o: J = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: C = None
        self.t: C = None
        self.x: E = None
        self.s: C = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: J = None
        self.p: A = None
        self.w: J = None
        self.t: F = None
        self.o: I = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: E = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: F = None
        self.s: I = None
        self.z: J = None
        self.o: J = None
        self.y: F = None
        self.w: B = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: C = None
        self.t: C = None
        self.x: E = None
        self.s: C = None
        self.o: C = None
        self.z: G = None
        self.txt = txt

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

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

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