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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.w: B = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: B = None
        self.v: G = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.w: B = None
        self.y: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: A = None
        self.q: B = None
        self.v: G = None
        self.u: G = None
        self.y: D = None
        self.txt = txt

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

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

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