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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.u: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.z: E = None
        self.p: B = None
        self.s: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: D = None
        self.u: I = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.z: E = None
        self.p: B = None
        self.s: H = None
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: A = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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