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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: I = None
        self.s: H = None
        self.r: D = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.p: A = None
        self.x: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.u: F = None
        self.z: H = None
        self.t: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: I = None
        self.s: H = None
        self.r: D = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.p: A = None
        self.x: A = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: E = None
        self.u: F = None
        self.z: H = None
        self.t: G = None
        self.txt = txt

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

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