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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.t: C = None
        self.s: C = None
        self.w: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.r: A = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: H = None
        self.x: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: H = None
        self.t: C = None
        self.s: C = None
        self.w: E = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.r: A = None
        self.p: E = None
        self.z: G = None
        self.txt = txt

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

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

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