class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: C = None
        self.t: C = None
        self.u: C = None
        self.q: H = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.p: F = None
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.x: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.v: G = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.w: E = None
        self.x: F = None
        self.u: H = None
        self.y: F = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: B = None
        self.p: F = None
        self.r: B = None
        self.q: H = None
        self.y: B = None
        self.x: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.v: G = None
        self.w: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: C = None
        self.w: E = None
        self.x: F = None
        self.u: H = None
        self.y: F = None
        self.t: C = None
        self.o: I = None
        self.txt = txt

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

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