class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: E = None
        self.p: J = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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