class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: D = None
        self.v: J = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.u: J = None
        self.w: H = None
        self.r: F = None
        self.v: J = None
        self.x: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.v: E = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: E = None
        self.q: A = None
        self.o: D = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.u: J = None
        self.w: H = None
        self.r: F = None
        self.v: J = None
        self.x: J = None
        self.p: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: B = None
        self.o: H = None
        self.s: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: D = None
        self.v: E = None
        self.s: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: E = None
        self.q: A = None
        self.o: D = None
        self.s: A = None
        self.y: G = None
        self.txt = txt

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

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