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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: A = None
        self.q: C = None
        self.x: C = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: G = None
        self.w: A = None
        self.p: B = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.r: E = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: F = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: A = None
        self.q: C = None
        self.x: C = None
        self.t: B = None
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: G = None
        self.w: A = None
        self.p: B = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: A = None
        self.r: E = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: D = None
        self.txt = txt

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

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