class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: H = None
        self.w: E = None
        self.u: B = None
        self.p: D = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.x: G = None
        self.o: H = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: D = None
        self.x: G = None
        self.o: H = None
        self.z: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.z: H = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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