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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.s: G = None
        self.o: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: A = None
        self.s: G = None
        self.o: H = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

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

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