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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.x: D = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: C = None
        self.x: D = None
        self.s: B = None
        self.r: E = None
        self.txt = txt

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

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

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