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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

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

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

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