class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: H = None
        self.s: I = None
        self.x: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.r: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: D = None
        self.r: F = None
        self.w: E = None
        self.s: F = None
        self.txt = txt

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

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