class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: D = None
        self.p: D = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.x: F = None
        self.s: A = None
        self.u: H = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: I = None
        self.x: F = None
        self.s: A = None
        self.u: H = None
        self.p: D = None
        self.y: I = None
        self.txt = txt

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

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

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

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