class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: E = None
        self.q: J = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.r: G = None
        self.w: E = None
        self.y: I = None
        self.u: J = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: D = None
        self.x: B = None
        self.u: I = None
        self.t: J = None
        self.r: D = None
        self.p: D = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: A = None
        self.w: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: E = None
        self.x: J = None
        self.s: D = None
        self.w: F = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.u: B = None
        self.p: C = None
        self.z: F = None
        self.t: B = None
        self.x: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: H = None
        self.r: G = None
        self.w: E = None
        self.y: I = None
        self.u: J = None
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: D = None
        self.x: B = None
        self.u: I = None
        self.t: J = None
        self.r: D = None
        self.p: D = None
        self.z: A = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: A = None
        self.w: J = None
        self.v: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: E = None
        self.x: J = None
        self.s: D = None
        self.w: F = None
        self.o: J = None
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: D = None
        self.u: B = None
        self.p: C = None
        self.z: F = None
        self.t: B = None
        self.x: H = None
        self.txt = txt

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

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