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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.q: C = None
        self.u: I = None
        self.s: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: I = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: B = None
        self.o: D = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: I = None
        self.q: C = None
        self.u: I = None
        self.s: G = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.x: I = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: B = None
        self.o: D = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

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

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

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