class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: J = None
        self.q: H = None
        self.w: C = None
        self.r: G = None
        self.x: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.x: J = None
        self.y: E = None
        self.w: G = None
        self.u: D = None
        self.s: C = None
        self.r: C = None
        self.z: I = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.y: I = None
        self.r: A = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.t: D = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.z: C = None
        self.o: H = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.x: J = None
        self.y: E = None
        self.w: G = None
        self.u: D = None
        self.s: C = None
        self.r: C = None
        self.z: I = None
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: I = None
        self.y: I = None
        self.r: A = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: A = None
        self.t: D = None
        self.q: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: C = None
        self.z: C = None
        self.o: H = None
        self.r: D = None
        self.txt = txt

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

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