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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.q: E = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.q: H = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: B = None
        self.x: G = None
        self.t: F = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: C = None
        self.o: A = None
        self.z: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: A = None
        self.q: E = None
        self.s: C = None
        self.v: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: H = None
        self.q: H = None
        self.u: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: B = None
        self.x: G = None
        self.t: F = None
        self.v: A = None
        self.y: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: C = None
        self.o: A = None
        self.z: D = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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