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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.r: H = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.z: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.y: C = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: B = None
        self.r: H = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: A = None
        self.z: C = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: C = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.y: C = None
        self.t: D = None
        self.q: C = None
        self.txt = txt

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

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