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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.x: H = None
        self.o: G = None
        self.u: J = None
        self.t: D = None
        self.z: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.p: D = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.q: J = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.p: E = None
        self.y: H = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.s: G = None
        self.z: D = None
        self.y: I = None
        self.r: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: H = None
        self.u: B = None
        self.z: F = None
        self.p: E = None
        self.y: D = None
        self.t: G = None
        self.txt = txt

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

l = A("l")
g = B("g")
d = C("d")
b = D("b")
e = E("e")
j = F("j")
c = G("c")
k = H("k")
a = I("a")
m = J("m")

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: H = None
        self.x: H = None
        self.o: G = None
        self.u: J = None
        self.t: D = None
        self.z: D = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: E = None
        self.p: D = None
        self.o: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.q: J = None
        self.x: A = None
        self.o: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: I = None
        self.p: E = None
        self.y: H = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.q: F = None
        self.s: G = None
        self.z: D = None
        self.y: I = None
        self.r: I = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: H = None
        self.u: B = None
        self.z: F = None
        self.p: E = None
        self.y: D = None
        self.t: G = None
        self.txt = txt

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

l = A("l")
g = B("g")
d = C("d")
b = D("b")
e = E("e")
j = F("j")
c = G("c")
k = H("k")
a = I("a")
m = J("m")

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