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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: G = None
        self.t: E = None
        self.x: E = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.w: D = None
        self.z: F = None
        self.s: F = None
        self.v: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: G = None
        self.t: E = None
        self.x: E = None
        self.r: G = None
        self.y: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: H = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: C = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.w: D = None
        self.z: F = None
        self.s: F = None
        self.v: H = None
        self.txt = txt

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

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

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