class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: G = None
        self.q: F = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.t: E = None
        self.s: A = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.y: A = None
        self.t: I = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: E = None
        self.v: G = None
        self.q: I = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: A = None
        self.t: E = None
        self.s: A = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: A = None
        self.y: A = None
        self.t: I = None
        self.w: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: E = None
        self.v: G = None
        self.q: I = None
        self.t: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.p: G = None
        self.txt = txt

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

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