class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: F = None
        self.w: E = None
        self.q: B = None
        self.o: F = None
        self.u: E = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

m = A("m")
a = B("a")
e = C("e")
k = D("k")
f = E("f")
i = F("i")
g = G("g")
d = H("d")
n = E("n")

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

m = A("m")
a = B("a")
e = C("e")
k = D("k")
f = E("f")
i = F("i")
g = G("g")
d = H("d")
n = E("n")

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