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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: G = None
        self.z: E = None
        self.p: G = None
        self.w: A = None
        self.y: H = None
        self.s: H = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.r: D = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: G = None
        self.z: E = None
        self.p: G = None
        self.w: A = None
        self.y: H = None
        self.s: H = None
        self.r: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.t: B = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: E = None
        self.r: D = None
        self.v: E = None
        self.y: C = None
        self.txt = txt

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

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