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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.p: E = None
        self.w: E = None
        self.u: C = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: B = None
        self.y: G = None
        self.o: B = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: I = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.s: H = None
        self.t: B = None
        self.x: F = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: D = None
        self.p: E = None
        self.w: E = None
        self.u: C = None
        self.o: H = None
        self.y: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: B = None
        self.y: G = None
        self.o: B = None
        self.u: H = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: I = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.s: H = None
        self.t: B = None
        self.x: F = None
        self.r: G = None
        self.z: A = None
        self.txt = txt

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

a.x = l
c.s = e
c.x = e
c.p = i
c.w = i
c.u = l
c.o = b
c.y = n
l.w = b
l.o = c
e.x = n
i.z = d
i.s = c
i.o = c
i.y = f
i.u = b
i.q = k
k.s = e
k.o = d
k.z = l
k.u = n
f.u = d
f.t = b
b.p = i
b.o = d
d.o = l
d.w = f
d.r = f
d.s = b
d.t = c
d.x = k
d.z = a
n.z = d
n.s = c
n.o = c
n.y = f
n.u = b
n.q = k
assert f.t.p.q.s.x.s.o.o.z.x.txt == "l"