class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: I = None
        self.q: C = None
        self.t: J = None
        self.w: B = None
        self.x: J = None
        self.o: J = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.x: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: J = None
        self.y: C = None
        self.o: I = None
        self.q: C = None
        self.r: B = None
        self.u: B = None
        self.w: I = None
        self.p: E = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: C = None
        self.q: E = None
        self.t: I = None
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.x: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: J = None
        self.y: C = None
        self.o: I = None
        self.q: C = None
        self.r: B = None
        self.u: B = None
        self.w: I = None
        self.p: E = None
        self.z: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: C = None
        self.q: E = None
        self.t: I = None
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.z: C = None
        self.txt = txt

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

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