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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: J = None
        self.p: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: J = None
        self.p: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.t: I = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: F = None
        self.t: B = None
        self.txt = txt

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

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

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