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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: B = None
        self.o: A = None
        self.r: B = None
        self.u: B = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.x: B = None
        self.o: A = None
        self.r: B = None
        self.u: B = None
        self.z: G = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: G = None
        self.r: F = None
        self.x: C = None
        self.txt = txt

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

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

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