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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: D = None
        self.p: D = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.y: A = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.q: C = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: D = None
        self.p: D = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: A = None
        self.y: A = None
        self.o: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

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

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