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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: J = None
        self.s: G = None
        self.y: J = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: I = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: J = None
        self.s: G = None
        self.y: J = None
        self.q: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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