class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: I = None
        self.u: C = None
        self.y: I = None
        self.x: D = None
        self.z: I = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.x: I = None
        self.p: E = None
        self.w: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.w: D = None
        self.t: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.x: H = None
        self.t: A = None
        self.s: H = None
        self.o: E = None
        self.v: J = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.y: C = None
        self.q: H = None
        self.o: D = None
        self.t: A = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: A = None
        self.x: I = None
        self.p: E = None
        self.w: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: C = None
        self.w: D = None
        self.t: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: E = None
        self.x: H = None
        self.t: A = None
        self.s: H = None
        self.o: E = None
        self.v: J = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: F = None
        self.y: C = None
        self.q: H = None
        self.o: D = None
        self.t: A = None
        self.r: D = None
        self.p: C = None
        self.txt = txt

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

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

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