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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.q: B = None
        self.z: B = None
        self.p: I = None
        self.r: C = None
        self.t: G = None
        self.u: I = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: I = None
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.u: G = None
        self.v: D = None
        self.o: E = None
        self.q: B = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.q: B = None
        self.z: B = None
        self.p: I = None
        self.r: C = None
        self.t: G = None
        self.u: I = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: I = None
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.u: G = None
        self.v: D = None
        self.o: E = None
        self.q: B = None
        self.y: E = None
        self.s: A = None
        self.txt = txt

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

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