class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: J = None
        self.r: H = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: D = None
        self.r: E = None
        self.o: J = None
        self.z: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.w: G = None
        self.r: E = None
        self.x: C = None
        self.q: C = None
        self.v: J = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: J = None
        self.v: C = None
        self.x: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.t: F = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.x: B = None
        self.q: H = None
        self.w: F = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: G = None
        self.z: H = None
        self.p: H = None
        self.q: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.u: D = None
        self.r: E = None
        self.o: J = None
        self.z: A = None
        self.s: G = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: E = None
        self.w: G = None
        self.r: E = None
        self.x: C = None
        self.q: C = None
        self.v: J = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: J = None
        self.v: C = None
        self.x: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.t: F = None
        self.z: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: D = None
        self.x: B = None
        self.q: H = None
        self.w: F = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: G = None
        self.z: H = None
        self.p: H = None
        self.q: I = None
        self.txt = txt

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

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