class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: J = None
        self.t: H = None
        self.z: F = None
        self.s: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.p: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: A = None
        self.s: G = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: E = None
        self.v: D = None
        self.w: A = None
        self.u: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.s: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.p: J = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: A = None
        self.s: G = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: E = None
        self.v: D = None
        self.w: A = None
        self.u: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.s: A = None
        self.p: D = None
        self.w: C = None
        self.txt = txt

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

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