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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.s: A = None
        self.v: H = None
        self.x: F = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.y: H = None
        self.q: A = None
        self.t: H = None
        self.u: G = None
        self.txt = txt

n = A("n")
f = B("f")
e = C("e")
a = D("a")
c = E("c")
k = F("k")
m = G("m")
b = H("b")
i = H("i")
l = F("l")

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: F = None
        self.s: A = None
        self.v: H = None
        self.x: F = None
        self.u: G = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.y: H = None
        self.q: A = None
        self.t: H = None
        self.u: G = None
        self.txt = txt

n = A("n")
f = B("f")
e = C("e")
a = D("a")
c = E("c")
k = F("k")
m = G("m")
b = H("b")
i = H("i")
l = F("l")

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