class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: C = None
        self.w: D = None
        self.r: J = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.s: D = None
        self.p: J = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.z: E = None
        self.u: B = None
        self.s: I = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: H = None
        self.v: F = None
        self.q: J = None
        self.o: B = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: F = None
        self.s: D = None
        self.p: J = None
        self.r: I = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.t: B = None
        self.z: E = None
        self.u: B = None
        self.s: I = None
        self.r: F = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: H = None
        self.v: F = None
        self.q: J = None
        self.o: B = None
        self.s: D = None
        self.z: A = None
        self.txt = txt

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

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

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