class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: F = None
        self.y: E = None
        self.p: C = None
        self.u: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: E = None
        self.s: A = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.t: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.r: A = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: J = None
        self.p: F = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.s: G = None
        self.p: E = None
        self.t: D = None
        self.u: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: E = None
        self.s: A = None
        self.v: H = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.t: A = None
        self.o: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: G = None
        self.q: B = None
        self.r: A = None
        self.w: F = None
        self.v: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: J = None
        self.p: F = None
        self.u: F = None
        self.q: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: C = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: B = None
        self.s: G = None
        self.p: E = None
        self.t: D = None
        self.u: G = None
        self.txt = txt

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

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