class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: E = None
        self.o: F = None
        self.t: E = None
        self.r: J = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: J = None
        self.r: B = None
        self.o: A = None
        self.u: I = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: A = None
        self.z: D = None
        self.r: G = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: J = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.y: H = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: C = None
        self.p: C = None
        self.t: C = None
        self.w: H = None
        self.o: I = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: J = None
        self.r: B = None
        self.o: A = None
        self.u: I = None
        self.w: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.x: A = None
        self.z: D = None
        self.r: G = None
        self.u: C = None
        self.s: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: J = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: E = None
        self.y: H = None
        self.o: C = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: C = None
        self.p: C = None
        self.t: C = None
        self.w: H = None
        self.o: I = None
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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