class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: D = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: B = None
        self.z: F = None
        self.o: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.w: A = None
        self.txt = txt

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

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