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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: H = None
        self.r: F = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: H = None
        self.v: A = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: H = None
        self.r: F = None
        self.z: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: H = None
        self.v: A = None
        self.z: F = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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