class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.w: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

i = A("i")
c = B("c")
m = C("m")
f = D("f")
a = E("a")
g = F("g")
k = G("k")
n = H("n")
h = I("h")
l = J("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: H = None
        self.w: I = None
        self.u: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

i = A("i")
c = B("c")
m = C("m")
f = D("f")
a = E("a")
g = F("g")
k = G("k")
n = H("n")
h = I("h")
l = J("l")

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