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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: G = None
        self.q: H = None
        self.s: H = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: G = None
        self.q: H = None
        self.s: H = None
        self.r: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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