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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.x: H = None
        self.s: H = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.t: F = None
        self.x: H = None
        self.s: H = None
        self.q: H = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.q: C = None
        self.z: B = None
        self.txt = txt

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

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