class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: B = None
        self.u: E = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.q: H = None
        self.t: G = None
        self.x: D = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: C = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: C = None
        self.q: H = None
        self.t: G = None
        self.x: D = None
        self.s: D = None
        self.v: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: A = None
        self.txt = txt

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

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