class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: J = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: D = None
        self.o: I = None
        self.u: E = None
        self.y: A = None
        self.w: C = None
        self.v: H = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.r: G = None
        self.u: H = None
        self.o: B = None
        self.w: I = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.x: B = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: D = None
        self.o: I = None
        self.u: E = None
        self.y: A = None
        self.w: C = None
        self.v: H = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: H = None
        self.r: G = None
        self.u: H = None
        self.o: B = None
        self.w: I = None
        self.p: B = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: I = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.x: B = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: H = None
        self.z: D = None
        self.s: C = None
        self.txt = txt

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

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