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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.v: B = None
        self.s: C = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.p: H = None
        self.w: B = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: A = None
        self.v: B = None
        self.s: C = None
        self.q: A = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: H = None
        self.p: H = None
        self.w: B = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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