class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.y: H = None
        self.z: F = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.r: F = None
        self.v: D = None
        self.w: A = None
        self.p: G = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.o: E = None
        self.x: C = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: C = None
        self.y: H = None
        self.z: F = None
        self.s: H = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: E = None
        self.w: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.o: C = None
        self.r: F = None
        self.v: D = None
        self.w: A = None
        self.p: G = None
        self.q: I = None
        self.u: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: B = None
        self.o: E = None
        self.x: C = None
        self.q: A = None
        self.p: F = None
        self.txt = txt

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

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