class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: E = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.u: B = None
        self.t: D = None
        self.s: H = None
        self.v: G = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: J = None
        self.z: D = None
        self.x: I = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: B = None
        self.u: B = None
        self.t: D = None
        self.s: H = None
        self.v: G = None
        self.r: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.y: J = None
        self.z: D = None
        self.x: I = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

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