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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: G = None
        self.v: H = None
        self.z: F = None
        self.p: E = None
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.s: B = None
        self.p: B = None
        self.u: D = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: G = None
        self.v: H = None
        self.z: F = None
        self.p: E = None
        self.s: F = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: F = None
        self.s: B = None
        self.p: B = None
        self.u: D = None
        self.x: B = None
        self.w: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

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

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