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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: B = None
        self.q: I = None
        self.v: F = None
        self.z: D = None
        self.y: F = None
        self.x: A = None
        self.p: A = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.q: I = None
        self.o: G = None
        self.s: D = None
        self.p: D = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: B = None
        self.q: I = None
        self.v: F = None
        self.z: D = None
        self.y: F = None
        self.x: A = None
        self.p: A = None
        self.u: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: A = None
        self.q: I = None
        self.o: G = None
        self.s: D = None
        self.p: D = None
        self.v: G = None
        self.z: F = None
        self.txt = txt

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

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

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