class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: J = None
        self.w: D = None
        self.y: H = None
        self.r: F = None
        self.o: E = None
        self.t: H = None
        self.p: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.y: H = None
        self.v: H = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.s: B = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.z: H = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.v: A = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: H = None
        self.y: H = None
        self.v: H = None
        self.u: E = None
        self.p: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: J = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: C = None
        self.s: B = None
        self.x: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.z: H = None
        self.w: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: D = None
        self.v: A = None
        self.q: B = None
        self.o: H = None
        self.txt = txt

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

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