class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.s: C = None
        self.u: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: D = None
        self.v: F = None
        self.t: B = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: D = None
        self.v: F = None
        self.t: B = None
        self.u: C = None
        self.o: C = None
        self.txt = txt

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

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