class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: E = None
        self.t: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.y: C = None
        self.q: B = None
        self.x: E = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.q: H = None
        self.v: A = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.z: G = None
        self.y: C = None
        self.q: B = None
        self.x: E = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.x: G = None
        self.q: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: G = None
        self.q: H = None
        self.v: A = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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