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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.p: D = None
        self.w: H = None
        self.s: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: I = None
        self.u: D = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.p: D = None
        self.w: H = None
        self.s: H = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.u: G = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: I = None
        self.u: D = None
        self.w: E = None
        self.y: D = None
        self.txt = txt

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

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

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