class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: B = None
        self.o: J = None
        self.u: E = None
        self.r: I = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.p: E = None
        self.v: I = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.p: J = None
        self.t: B = None
        self.r: H = None
        self.s: F = None
        self.z: G = None
        self.v: F = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: F = None
        self.r: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.q: A = None
        self.p: E = None
        self.v: I = None
        self.w: A = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: A = None
        self.p: J = None
        self.t: B = None
        self.r: H = None
        self.s: F = None
        self.z: G = None
        self.v: F = None
        self.u: J = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.u: I = None
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: J = None
        self.t: F = None
        self.r: I = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: B = None
        self.t: J = None
        self.txt = txt

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

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

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