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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: I = None
        self.z: A = None
        self.w: H = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: I = None
        self.z: A = None
        self.w: H = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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