class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: B = None
        self.p: E = None
        self.z: C = None
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.z: F = None
        self.w: C = None
        self.q: H = None
        self.s: C = None
        self.v: F = None
        self.t: A = None
        self.o: J = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: C = None
        self.t: J = None
        self.v: C = None
        self.r: I = None
        self.q: A = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: J = None
        self.o: J = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.s: C = None
        self.r: J = None
        self.y: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.q: J = None
        self.w: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.z: F = None
        self.w: C = None
        self.q: H = None
        self.s: C = None
        self.v: F = None
        self.t: A = None
        self.o: J = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.w: C = None
        self.t: J = None
        self.v: C = None
        self.r: I = None
        self.q: A = None
        self.p: F = None
        self.y: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: J = None
        self.o: J = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: A = None
        self.s: C = None
        self.r: J = None
        self.y: I = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: I = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: A = None
        self.q: J = None
        self.w: F = None
        self.txt = txt

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

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

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