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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.u: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.u: E = None
        self.q: C = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.y: H = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

m = A("m")
i = B("i")
b = C("b")
f = D("f")
l = E("l")
d = F("d")
k = G("k")
n = H("n")
j = E("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.u: H = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.u: E = None
        self.q: C = None
        self.r: H = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: A = None
        self.y: H = None
        self.w: A = None
        self.o: E = None
        self.txt = txt

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

m = A("m")
i = B("i")
b = C("b")
f = D("f")
l = E("l")
d = F("d")
k = G("k")
n = H("n")
j = E("j")

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