class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: D = None
        self.u: C = None
        self.o: F = None
        self.w: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.y: E = None
        self.z: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: D = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: E = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.y: E = None
        self.z: H = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.s: F = None
        self.v: F = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: D = None
        self.v: H = None
        self.x: A = None
        self.txt = txt

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

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

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