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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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