class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: H = None
        self.u: H = None
        self.w: F = None
        self.y: B = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.t: H = None
        self.o: H = None
        self.x: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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