class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: H = None
        self.x: J = None
        self.p: C = None
        self.y: E = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

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

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