class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.p: D = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.x: A = None
        self.o: J = None
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: F = None
        self.t: I = None
        self.u: H = None
        self.y: I = None
        self.s: C = None
        self.r: F = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: G = None
        self.x: A = None
        self.o: J = None
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: F = None
        self.t: I = None
        self.u: H = None
        self.y: I = None
        self.s: C = None
        self.r: F = None
        self.w: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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