class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.s: J = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: I = None
        self.q: D = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.z: B = None
        self.w: F = None
        self.o: C = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.u: H = None
        self.o: H = None
        self.t: E = None
        self.q: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: G = None
        self.q: D = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: I = None
        self.q: D = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.z: B = None
        self.w: F = None
        self.o: C = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.u: H = None
        self.o: H = None
        self.t: E = None
        self.q: E = None
        self.x: A = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.txt = txt

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

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