class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: J = None
        self.v: I = None
        self.y: J = None
        self.z: H = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: J = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.r: B = None
        self.w: D = None
        self.p: B = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: G = None
        self.s: B = None
        self.w: J = None
        self.q: F = None
        self.v: B = None
        self.p: J = None
        self.t: H = None
        self.r: J = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: J = None
        self.x: G = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.r: B = None
        self.w: D = None
        self.p: B = None
        self.v: D = None
        self.u: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: G = None
        self.s: B = None
        self.w: J = None
        self.q: F = None
        self.v: B = None
        self.p: J = None
        self.t: H = None
        self.r: J = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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