class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: E = None
        self.y: G = None
        self.x: B = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.x: F = None
        self.q: A = None
        self.w: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: B = None
        self.o: G = None
        self.y: A = None
        self.p: I = None
        self.s: D = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: I = None
        self.w: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: F = None
        self.x: G = None
        self.p: A = None
        self.z: D = None
        self.q: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: A = None
        self.x: F = None
        self.q: A = None
        self.w: F = None
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: B = None
        self.o: G = None
        self.y: A = None
        self.p: I = None
        self.s: D = None
        self.r: D = None
        self.q: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: I = None
        self.w: J = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: F = None
        self.x: G = None
        self.p: A = None
        self.z: D = None
        self.q: B = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

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

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

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