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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.o: B = None
        self.u: G = None
        self.y: D = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: G = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
a = C("a")
f = D("f")
i = E("i")
c = F("c")
h = G("h")
e = H("e")

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: G = None
        self.o: B = None
        self.u: G = None
        self.y: D = None
        self.s: B = None
        self.t: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: G = None
        self.txt = txt

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

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

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

m = A("m")
j = B("j")
a = C("a")
f = D("f")
i = E("i")
c = F("c")
h = G("h")
e = H("e")

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