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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: I = None
        self.y: B = None
        self.r: C = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.s: B = None
        self.x: A = None
        self.w: H = None
        self.r: J = None
        self.y: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.v: B = None
        self.o: J = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: A = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: I = None
        self.y: B = None
        self.r: C = None
        self.q: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.s: B = None
        self.x: A = None
        self.w: H = None
        self.r: J = None
        self.y: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: D = None
        self.v: B = None
        self.o: J = None
        self.t: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: A = None
        self.r: H = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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