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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.w: F = None
        self.v: C = None
        self.s: D = None
        self.z: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.u: C = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: C = None
        self.z: G = None
        self.s: B = None
        self.w: D = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: C = None
        self.w: F = None
        self.v: C = None
        self.s: D = None
        self.z: B = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: G = None
        self.u: C = None
        self.y: G = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: B = None
        self.y: G = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: C = None
        self.z: G = None
        self.s: B = None
        self.w: D = None
        self.p: F = None
        self.t: F = None
        self.txt = txt

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

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