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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: H = None
        self.q: A = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.p: A = None
        self.u: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: G = None
        self.s: H = None
        self.q: A = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.y: C = None
        self.u: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.r: A = None
        self.v: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: F = None
        self.p: A = None
        self.u: I = None
        self.txt = txt

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

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