class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: E = None
        self.r: E = None
        self.u: B = None
        self.q: C = None
        self.p: B = None
        self.o: E = None
        self.v: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.q: G = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: D = None
        self.q: G = None
        self.v: C = None
        self.p: C = None
        self.txt = txt

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

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