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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

a = A("a")
f = B("f")
i = C("i")
n = D("n")
l = E("l")
k = F("k")
e = G("e")
h = H("h")
b = I("b")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.txt = txt

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

a = A("a")
f = B("f")
i = C("i")
n = D("n")
l = E("l")
k = F("k")
e = G("e")
h = H("h")
b = I("b")
m = J("m")

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