class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.w: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.w: J = None
        self.o: J = None
        self.z: J = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.s: H = None
        self.r: A = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: D = None
        self.w: J = None
        self.o: J = None
        self.z: J = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: E = None
        self.s: H = None
        self.r: A = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: F = None
        self.q: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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