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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.w: H = None
        self.t: A = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: C = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: I = None
        self.z: E = None
        self.y: C = None
        self.s: I = None
        self.r: C = None
        self.v: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: E = None
        self.w: H = None
        self.t: A = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: C = None
        self.r: C = None
        self.x: A = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: I = None
        self.z: E = None
        self.y: C = None
        self.s: I = None
        self.r: C = None
        self.v: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: C = None
        self.txt = txt

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

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

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

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