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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.s: D = None
        self.u: I = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: A = None
        self.p: C = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.s: D = None
        self.u: I = None
        self.q: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: A = None
        self.q: G = None
        self.v: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.o: C = None
        self.w: I = None
        self.txt = txt

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

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

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

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