class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.r: D = None
        self.q: B = None
        self.p: E = None
        self.o: C = None
        self.x: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: I = None
        self.w: D = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.y: D = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: I = None
        self.w: D = None
        self.z: B = None
        self.y: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: G = None
        self.r: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: F = None
        self.y: D = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

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