class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: H = None
        self.v: I = None
        self.u: J = None
        self.q: I = None
        self.s: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.z: G = None
        self.v: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.p: H = None
        self.v: I = None
        self.u: J = None
        self.q: I = None
        self.s: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: G = None
        self.z: G = None
        self.v: E = None
        self.txt = txt

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

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